拦截器主动抛出异常为何还会执行后续的response.getResult()操作?
- Dominant language
- Java
- Stars
- 1.9k
- Forks
- 241
- PR merge metrics
- No merged PRs in 30d
Description

此处handleError的时候会出来响应码不为200的,并包装成网络错误

某个拦截器的onError方法主动抛出了自定义异常,会被最初的handleSyncWithException的catch (Throwable th)拦截。
此时为何又要去response.getResult()?


如果getResult一般会抛出数据转换异常,这样导致自定义拦截器中抛出的自定义异常丢失。



这个如何解决?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by tracing the exception flow through handleError, handleSyncWithException, the interceptor onError method, and response.getResult(). Reproduce a non-200 response where onError throws a custom exception, then verify that the custom exception is preserved and data conversion is not invoked afterward.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100