Developer should throw custom exception in interceptor
Nobody has claimed this yet.
- Dominant language
- Dart
- Stars
- 12.8k
- Forks
- 1.6k
- PR merge metrics
- No merged PRs in 30d
Description
Request Statement
When i write a interceptor class extends Interceptor, in some case, i wish throw some exception to tell the developer some thing went wrong. so i throw a custom exception in override function 'onResponse', but this exception was catched by DioException, and this exception can not tell me more infomation about this error.
So, i wish this will be supported
Solution Brainstorm
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the Interceptor.onResponse entry point and the current DioException handling path. Review the 17-comment discussion to determine the agreed behavior for custom exceptions, then define completion around preserving enough information for a custom exception thrown by an interceptor to be distinguishable from DioException.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart
- Domain
- api
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 42/100