RxWeaver icon indicating copy to clipboard operation
RxWeaver copied to clipboard

关于OnNextInterceptor服务端返回异常处理

Open aowoWolf opened this issue 5 years ago • 3 comments

这几天仔细把这个库看完了,我现在处理使用map来处理服务端返回的异常,如果code不匹配,直接throw一个,这样代码量就更少,也好理解(相比使用flatmap)。然后今天用公司的接口实践,结果错误都返回400,然后OnNextInterceptor里面都拿不到错误信息,全部都堆再onError里面去了,难受

aowoWolf avatar Feb 28 '20 08:02 aowoWolf

不知道你想表达什么。这个库就用的。我公司项目,现在我全部要求兄弟们用 mvp rxjava 加这个库了

Gowa2017 avatar Feb 28 '20 09:02 Gowa2017

#response_container_BBPPID{font-family: initial; font-size:initial; color: initial;} 没啥,我就瞎扯的.就是现在我们后端查询返回的错误结果都是错误400,通过retrofit和Rx Java转一下,就不能在onnextintercept里面收到响应体,只能在error里面收到httpexception,加上开发不规范,返回的数据格式也多种多样,导致现在我只能拿到正确数据,否则全部都是http的error 发送自我的 BlackBerry - 安全智能手机 发件人: [email protected]发送时间: 2020年2月28日 17:42收件人: [email protected]回复: [email protected]抄送: [email protected]; [email protected]主题: Re: [qingmei2/RxWeaver] 关于OnNextInterceptor服务端返回异常处理 (#3) 不知道你想表达什么。这个库就用的。我公司项目,现在我全部要求兄弟们用 mvp rxjava 加这个库了

—You are receiving this because you authored the thread.Reply to this email directly, view it on GitHub, or unsubscribe.

aowoWolf avatar Feb 28 '20 16:02 aowoWolf

自己改一下 GlobalTransformer 。

Gowa2017 avatar Feb 28 '20 18:02 Gowa2017