Gnomeshade
Gnomeshade copied to clipboard
Parse `ProblemDetails` returned from API to provide structured error data
Is your feature request related to a problem? Please describe.
Right now in case of any exception from API an HttpRequestException
is thrown with the response content as the message. It's hard to take any action or provide any structured details to the user this way.
Describe the solution you'd like
The IGnomeshadeClient
parses ProblemDetails
if they are returned.
Additional context
I'm not sure what would be the best way to return those details - either by using OneOf<TRespose, ProblemDetails>
, or throwing an exception.