-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UnexpectedHttpStatusCodeException: more verbose message #333
Conversation
Source/EasyNetQ.Management.Client/UnexpectedHttpStatusCodeException.cs
Outdated
Show resolved
Hide resolved
StatusCode = statusCode; | ||
} | ||
|
||
public static async Task<UnexpectedHttpStatusCodeException> FromHttpResponseMessageAsync(HttpResponseMessage response) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You also might consider adding cancellation token here...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Pliner well, ok.
However, HttpContent.ReadAsStringAsync(CancellationToken) exists since .NET 5.0 only.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did not know that, sorry :(
@Pliner I added CancellationToken, please review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
Add response.Content (as string) to exception message.