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
Currently, when the Rest Client encounters an exception, it wraps it in a RestResponse with a Bad Request code.
This is misleading, especially since there are no sanity checks when adding Url segments or query strings (e.g. is the value null?). This results in exceptions that are not caused by the HTTP client itself, and so deserves to be wrapped in PortableRestException - or at least just be thrown as-is.
So I just spent the last few hours trying to figure out this exact issue. My entity changed and instead of giving me a serialization error, it gave me a bad request. I agree that this should be changed.
Currently, when the Rest Client encounters an exception, it wraps it in a RestResponse with a Bad Request code.
This is misleading, especially since there are no sanity checks when adding Url segments or query strings (e.g. is the value null?). This results in exceptions that are not caused by the HTTP client itself, and so deserves to be wrapped in PortableRestException - or at least just be thrown as-is.
Offending code: https://github.com/advancedrei/PortableRest/blob/master/src/PortableRest/RestClient.cs#L193
The text was updated successfully, but these errors were encountered: