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
Decoder.runWithException() throws a plain DecoderError object which is not an Error instance. This means that the error has no stack trace attached and does not play well with generic exception handling mechanisms that expect an Error instance. (In my case, the error object was logged by Sentry which failed to provide useful information like error message and stack trace.) The same issue exists with Decoder.runPromise().
I’d suggest turning DecoderError into a subclass of Error, providing it with a message, and keeping the rest of the attributes. (Maybe it would make sense to drop kind in favor of the more standard name.) This change would be backwards compatible. I’d be happy to implement the change.
The text was updated successfully, but these errors were encountered:
Decoder.runWithException()
throws a plainDecoderError
object which is not anError
instance. This means that the error has no stack trace attached and does not play well with generic exception handling mechanisms that expect anError
instance. (In my case, the error object was logged by Sentry which failed to provide useful information like error message and stack trace.) The same issue exists withDecoder.runPromise()
.I’d suggest turning
DecoderError
into a subclass ofError
, providing it with a message, and keeping the rest of the attributes. (Maybe it would make sense to dropkind
in favor of the more standardname
.) This change would be backwards compatible. I’d be happy to implement the change.The text was updated successfully, but these errors were encountered: