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
The problem
Request errors e.g. ETIMEDOUT don't have status or error code, would be nice to have so we can use them to open a circuit breaker or log out.
Suggested solution
Make transport.js add error code in createError()
createError(err, ctx) {
const error = new Error(`Request failed for ${ctx.req.getMethod()} ${ctx.req.getUrl()}: ${err.message}`);
error.code = err.code;
return error;
}
Alternatives considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
We need to make timeout errors open our circuit breaker, as currently, we only open when we get 100+ 5xx errors. We do get the timeout error, but only as error object, with no error or status code which makes it hard to identify them, would be nice for request errors (e.g. timeout errors) to have error codes to identify them.
The text was updated successfully, but these errors were encountered:
The problem
Request errors e.g. ETIMEDOUT don't have status or error code, would be nice to have so we can use them to open a circuit breaker or log out.
Suggested solution
Make transport.js add error code in createError()
Local changes
Alternatives considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
We need to make timeout errors open our circuit breaker, as currently, we only open when we get 100+ 5xx errors. We do get the timeout error, but only as error object, with no error or status code which makes it hard to identify them, would be nice for request errors (e.g. timeout errors) to have error codes to identify them.
The text was updated successfully, but these errors were encountered: