How to handle different response codes in an API request?
I'm working with an API that has different json responses depending on success/failure. They are not HTTP errors, but codes in the json body. There are two possible error codes (400 and 404), and then you have your successful API…