-
-
Notifications
You must be signed in to change notification settings - Fork 102
Closed
Labels
Description
Currently it does not seem to be possible to specify one catcher for all errors, which may be preferable in case there is no logic specific to particular errors, but just one way to handle them all - e. g. passthrough to an external system, such as BugSnag or Sentry.
Would be great to have something like
wretch("...")
.anyError((err) => console.log(err))
.get()
It is sorta kinda doable via .get().res().catch()
now, but this can only be applied per request, so it doesn't work as a system-wide (or a client-wide) hook.
dmitrybezly