-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Keep DioException.toString
clean !!!
#2287
Comments
To ignore these useless text, I have to dig into each logging process, each error print process to "Remove" these message, or even ignore entire DioException. |
It was introduced since we had a lot of people in the past creating issues for exceptions being thrown due to bad HTTP status codes. So in contrast to what the issue says, a lot of people do indeed not know HTTP status codes. I probably wouldn't introduce something like the suggestion but rather make it more verbose in debug mode vs release mode. That being said, I would like to further understand what the issue with being verbose is.
I realise that this is a rethorical question, but people who just start out don't know, and for those these kinds of messages are super helpful. Not everyone knows as much as you or I. |
@ueman maybe we can add a configuration, such as static field |
I've filed 2 PRs to find out if there is a better answer for the issue. Please vote or add comments if you'd like to. |
Request Statement
To be honest, the new added detail message about the error reason, is useless for developer. Such as:
In most cases, developer will log error to console or file, these messages are useless and annoying. Which developer doesn't know the http code meaning? If one kind of error keeps raising, the log will be filled with these useless texts.
Solution Brainstorm
Ensure
toString
only print "necessary" info, and print extra helpful info in another method liketoDetailString
.So if want to show user the error detail, we could just call
DioException.toDetailString
. If we want to print or logging, normal toString is enough.The text was updated successfully, but these errors were encountered: