snapi
snapi copied to clipboard
RD-10741 Improve error handling in the REST Client.
- Adds new exceptions for bad responses so that messages are clearly defined
- Centralizes automatic retries on 503 in a single method
- Remove accidentally passing bodies as exception messages for auth error
Note that this removes the "fundamentally broken" handleUnexpected method, which is still used by the Runner, so a small fix will be necessary there.