Commit 64aaa45a by 万齐军

http api code

parent f35d39b7
...@@ -205,7 +205,7 @@ class HttpConfig { ...@@ -205,7 +205,7 @@ class HttpConfig {
if(!isPlaintext(buffer)) return@Interceptor resp if(!isPlaintext(buffer)) return@Interceptor resp
val readString = buffer.clone().readString(Charset.forName("UTF-8")) val readString = buffer.clone().readString(Charset.forName("UTF-8"))
val fromJson = Gson().fromJson<BaseAPIResponse<Any>>(readString, BaseAPIResponse::class.java) val fromJson = Gson().fromJson<BaseAPIResponse<Any>>(readString, BaseAPIResponse::class.java)
if (fromJson.code != "200") { if (fromJson.code != "200" && fromJson.code != "0") {
Apm.reportCustom("network_business_error", "${api}(${fromJson.code},${fromJson.msg})", Exception("${api}(${fromJson.code},${fromJson.msg})")) Apm.reportCustom("network_business_error", "${api}(${fromJson.code},${fromJson.msg})", Exception("${api}(${fromJson.code},${fromJson.msg})"))
} }
} catch (throwable: Throwable) { } catch (throwable: Throwable) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment