redarrowlabs / Argo

:squirrel: c# object => json.api relational mapping
MIT License
7 stars 3 forks source link

Request failures do not produce useful information #67

Closed zeitlerc closed 7 years ago

zeitlerc commented 7 years ago

Argo always uses response.EnsureSuccessStatusCode() to check the response code, which throws System.Net.Http.HttpRequestException. That exception does not contain the content of the exception or the request being sent, which makes debugging difficult. I'm currently receiving a 400 response code and having a hard time figuring out what is wrong. A custom exception containing the request and response content would be super useful, but either one would greatly help debugging.

zeitlerc commented 7 years ago

Merged in code that throws a custom exception containing response content