Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix to not have unneeded console errors #4482

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jtran
Copy link
Collaborator

@jtran jtran commented Nov 13, 2024

We were logging errors when there were no actual problems. The variables pane is one place, but there are others.

This adds an optional variant of a function that was generating errors.

This also adds a Reason class that can be used in this pattern where you don't want to duplicate logic, but you also don't want to generate an error only to throw it away in the caller.

The root cause is the console.error() in our err() function.

Slack

Copy link

qa-wolf bot commented Nov 13, 2024

QA Wolf here! As you write new code it's important that your test coverage is keeping up.
Click here to request test coverage for this PR!

Copy link

vercel bot commented Nov 13, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
modeling-app ✅ Ready (Inspect) Visit Preview Nov 13, 2024 6:26pm

@lf94
Copy link
Contributor

lf94 commented Nov 13, 2024

Nice, but what happens when we do need the stack trace? new Reason(new Error().stack) ?

@jtran
Copy link
Collaborator Author

jtran commented Nov 13, 2024

You would not use Reason.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants