qingmei2 / RxWeaver

:baby_chick: 一种基于RxJava2实现全局Error处理的实现方式。
https://www.jianshu.com/p/eb10d6e40c4b
269 stars 37 forks source link

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

Open aowoWolf opened 4 years ago

aowoWolf commented 4 years ago

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

Gowa2017 commented 4 years ago

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

aowoWolf commented 4 years ago

response_container_BBPPID{font-family: initial; font-size:initial; color: initial;} 没啥,我就瞎扯的.就是现在我们后端查询返回的错误结果都是错误400,通过retrofit和Rx Java转一下,就不能在onnextintercept里面收到响应体,只能在error里面收到httpexception,加上开发不规范,返回的数据格式也多种多样,导致现在我只能拿到正确数据,否则全部都是http的error 发送自我的 BlackBerry - 安全智能手机 发件人: notifications@github.com发送时间: 2020年2月28日 17:42收件人: RxWeaver@noreply.github.com回复: reply@reply.github.com抄送: 1187340067@qq.com; author@noreply.github.com主题: 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.

Gowa2017 commented 4 years ago

自己改一下 GlobalTransformer 。