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
Of course it's trivial to convert between Number and String but maybe String is a better default as statusCode.startsWith("2") / statusCode.startsWith("4") type of operations seems
to naturally follow the response.
The text was updated successfully, but these errors were encountered:
I think it makes more sense to use numbers so that you can do stuff like statusCode > 200. Long term it may be doing something like #41 where any request made to the server that receives a response will be treated as success. Only errors that can't reach the server will be treated as an error. It would be much more necessary in this case to allow something like statusCode >= 200 && statusCode < 300.
Should be easy enough to just do String(statusCode).startsWith('2').
Of course it's trivial to convert between
Number
andString
but maybeString
is a better default asstatusCode.startsWith("2")
/statusCode.startsWith("4")
type of operations seemsto naturally follow the response.
The text was updated successfully, but these errors were encountered: