Skip to content

Commit

Permalink
add error status msg FAILURE
Browse files Browse the repository at this point in the history
  • Loading branch information
zhouaini528 committed Feb 13, 2023
1 parent 8f277a1 commit 6b26efd
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/Api/Base.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,12 +121,10 @@ protected function error($msg){
$temp=json_decode($msg,true);
if(!empty($temp) && is_array($temp)) {
if(isset($httpcode)) $temp['_httpcode']=$httpcode;
return ['_error'=>$temp];
return ['_error'=>$temp,'_status'=>'FAILURE'];
}

return [
'_error'=>$msg,
];
return ['_error'=>$msg,'_status'=>'FAILURE'];
}

/**
Expand Down

0 comments on commit 6b26efd

Please sign in to comment.