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
Some endpoints have different implications to each kind of HTTP response code, for example, not all 500s are internal server errors, they could be authentication mismatching in specific context.
Array<{// Determines if case is applicable; number for HTTP status code, or// a function that takes the response object and returns the validity.case: number|(r: Response)=>boolean,// Function to run if `case` matches the response's HTTP status code// or is true.fn: ()=>void,}>
Proposals
Add parameter that specifies an array of cases and functions.
The text was updated successfully, but these errors were encountered:
insyri
changed the title
Custom error handlers in httpRaw()Some endpoints have different implications to each kind of HTTP response code, for example, not all 500s are internal server errors, they could be authentication mismatching in specific context. (Idea: add parameter that specifies an array of cases and functions.)Array<{ // Determines if case is applicable; number for HTTP status code, or // a function that takes the response object and returns the validity. case: number | (r: Response) => boolean, // Function to run if case matches the response's HTTP status code // or is true. fn: () => void,}> boolean, // Function to run if case matches the response's HTTP status code // or is true. fn: () => void,}>" tabindex="0" role="button">
Custom error handler
Dec 3, 2022
insyri
changed the title
Custom error handler
Custom error handlers in httpRaw()Dec 3, 2022
Some endpoints have different implications to each kind of HTTP response code, for example, not all
500
s are internal server errors, they could be authentication mismatching in specific context.Proposals
The text was updated successfully, but these errors were encountered: