Open ivandotv opened 2 years ago
It is possible to register a handler for errors occurring during context creation in the onPluginInit
hook: https://github.com/dotansimha/envelop/blob/2f41de9bba86218bbbde1c614679f222def4c628/packages/core/src/plugins/use-masked-errors.ts#L112-L116
I updated your issue with the reproduction template, can you please provide everything required for helping you (mainly a minimal reproduction on StackBlitz).
Hey @ivandotv. It'd be great if you could provide a minimal reproduction example, so that we can help you
Issue workflow progress
Progress of the issue based on the Contributor Workflow
@envelop/*
packages that you are using.Describe the bug Can't respond to errors triggered in plugins. Errors do bubble up into the server response
errors
key however there is no way to respond to them (reshape, log etc..)To Reproduce Consider this: Error thrown in
useExtendContext
can't be handled anywhere.Expected behavior Respond to thrown errors before they are sent.
Environment:
@envelop/...
:Additional context