This repository was archived by the owner on Feb 2, 2024. It is now read-only.

Description
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
function handleErrors (err, req, res) {
If(res.writableFinished === false) {
if(err.code === 'SOMETHING') {
// some logic here
}
}
}
proxy(req, res, source, { onError: handleErrors })