WithoutThrowOnNonSuccessfulConnectResponse #1802
Unanswered
ramonsmits
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The log shows:
The thing is... I don't have any exceptions in my code :)
So I started browsing the code and found:
https://github.com/dotnet/MQTTnet/blob/v4.2.1.781/Source/MQTTnet/Client/MqttClient.cs#L455-L467
Which resulted in the following PR as that warning should only logged when actually throwing the exception:
However, the documentation isn't making any mention of this and its a bit unclear how to actually deal with server errors.
In code it states:
How should I deal with the result?
I can do something like the following to just suppress the warning and just move the throwing of the exception:
But... based on the code comment it seems it is expected a different type of handling and I'm interested to learn what is expected from a user.
Beta Was this translation helpful? Give feedback.
All reactions