Skip to content

Conversation

@zwhitchcox
Copy link
Contributor

This was causing objects that were thrown to be shown as [Object object]. console.error should log the error as red anyway.

In our case, there was a sentry error report that was run in a prisma transaction (bad practice, I know), but since there was no active sentry account in the staging environment, this request was timing out (not sure why sentry doesn't throw an error).

The prisma transaction timeout is thrown as an object, not an error instance, and we weren't able to see the error.

All the platforms I tested on (browser, node) output the error in red anyway, so I think it's better just to remove the color to prevent the risk of not showing a proper error message at all.

Test Plan

I'm not sure this really lends itself to testing

Checklist

  • Tests updated
  • Docs updated

Screenshots

Unfortunately I don't have any screenshots, but you can imagine what the [Object object] error would look like in the fly logs.

Copy link
Member

@kentcdodds kentcdodds left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're absolutely right 👍

@kentcdodds kentcdodds merged commit 1f76cd8 into epicweb-dev:main Sep 17, 2024
5 checks passed
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