Skip to content

Commit

Permalink
Merge branch 'api/checkvresponse'
Browse files Browse the repository at this point in the history
  • Loading branch information
haolun committed Aug 15, 2023
2 parents 869719e + fdc6308 commit 3a16cab
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/api_service/api_interceptor.dart
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class ApiInterceptors extends Interceptor with InterceptorMixin {
@override
void onResponse(Response response, ResponseInterceptorHandler handler) async {
if (response.data.containsKey('code') && baseConstant.success200) {
if (response.data['code'] >= 200) {
if (response.data['code'] >= 200 && !response.data['status']) {
return handler.reject(
onErrorProcess(
response.data['code'],
Expand Down
2 changes: 1 addition & 1 deletion lib/api_service/api_logger_interceptor.dart
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class XLoggerInterceptors extends Interceptor with InterceptorMixin {
@override
void onResponse(Response response, ResponseInterceptorHandler handler) async {
if (response.data.containsKey('code') && baseConstant.success200) {
if (response.data['code'] >= 200) {
if (response.data['code'] >= 200 && !response.data['status']) {
XLogger.errorHead('START ERROR');
XLogger.errorBody('║');
XLogger.errorBody('╟ RESPONSE STATUS CODE: ${response.data['code']}');
Expand Down

0 comments on commit 3a16cab

Please sign in to comment.