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
{{ message }}
This repository has been archived by the owner on Feb 2, 2024. It is now read-only.
I have searched existing issues to ensure the feature has not already been requested
🚀 Feature Proposal
Currently, if an error is thrown when the proxied request is made, the error is handled by fast-proxy. It would be nice for an optional callback to be passed so that the error, req, and res can be exposed to the user and handled as they see fit.
Motivation
No response
Example
function handleErrors (err, req, res) {
If(res.writableFinished === false) {
if(err.code === 'SOMETHING') {
// some logic here
}
}
}
proxy(req, res, source, { onError: handleErrors })
The text was updated successfully, but these errors were encountered:
jcbain
added a commit
to TugboatQA/fast-proxy
that referenced
this issue
Aug 8, 2023
Prerequisites
🚀 Feature Proposal
Currently, if an error is thrown when the proxied request is made, the error is handled by
fast-proxy
. It would be nice for an optional callback to be passed so that the error, req, and res can be exposed to the user and handled as they see fit.Motivation
No response
Example
The text was updated successfully, but these errors were encountered: