Replies: 1 comment 2 replies
|
At that point you could also basically copy Throwing for bad status code is one of the main differences to the |
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I was thinking a lot about this while playing with the wrong
stackTraces issue.The whole concept of throwing a
DioErrorin case of a server response with a bad status code seems wrong.With the advent of sealed classes and pattern matching, it would be a nice time to design a new API for Dio.
Something along the lines:
I think we can completely get rid of
DioErrorwith this. Response errors are justFailures and don't need a stackTrace because they are not thrown around anymore. And all other errors don't need to be wrapped, instead we could provide some smart helpers for error handling.What do you guys think? @AlexV525 @ueman
All reactions