You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(core): Suppress stack when SentryError isn't an error (#5562)
We use `SentryError`s in our event processing and sending pipeline both when something has gone legitimately wrong and when we just want to bail on a promise chain. In all cases, however, we log both the message and the stack, at a warning log level, which both clutters the logs and unnecessarily alarms anyone who has logging on.
This fixes that by adding a `logLevel` property to the `SentryError` class, which can be read before we log to the console. The default behavior remains the same (log the full error, using `logger.warn`), but now we have the option of passing `'log'` as a second constructor parameter, in order to mark a given `SentryError` as something which should only be `logger.log`ged and whose stack should be suppressed.
0 commit comments