dromara / forest

A high-level and lightweight declarative HTTP client framework for Java. it makes sending HTTP requests in Java easier.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

拦截器主动抛出异常为何还会执行后续的response.getResult()操作?

jidaojiuyou opened this issue · comments

image
此处handleError的时候会出来响应码不为200的,并包装成网络错误
image
某个拦截器的onError方法主动抛出了自定义异常,会被最初的handleSyncWithException的catch (Throwable th)拦截。
此时为何又要去response.getResult()?
image
image
如果getResult一般会抛出数据转换异常,这样导致自定义拦截器中抛出的自定义异常丢失。
image
image
image
这个如何解决?