Closed Philonous closed 1 year ago
I think this point has come up previously (although I can't find the relevant comment right now), but the gist of it is that the current state of things isn't really a deliberate design decision and just a missing implementation of other status codes. So the check should indeed be during validation and not during parsing.
validateResponse
checks that the response status isSuccess
, however, there is only one status code defined:Success
, so the check is a no-op.Presence of any other status code is handled as a parse failure instead of a validation failure.
While this isn't directly a problem, I think it would be more consistent to parse status codes and let the validation check for success.