调试工具

This commit is contained in:
候学杰 2019-01-30 17:39:25 +08:00
parent e198efa7ce
commit 50c3fb8e26
3 changed files with 11 additions and 5 deletions

View File

@ -118,7 +118,8 @@ class Client extends JsonRpc
}
if (isset($body['error']) && isset($body['error']['code']) && isset($body['error']['message'])) {
$message = is_array($body['error']['message']) ? json_encode($body['error']['message']) : $body['error']['message'];
throw new RpcServerException($message, $body['error']['code']);
$e = new RpcServerException($message, $body['error']['code']);
throw $e;
}
return $body['result'];

View File

@ -20,7 +20,9 @@ class BaseServiceProvider extends ServiceProvider
//local
'127.0.0.1',
//北京办公区
'172.16.100.0/16'
'172.16.100.0/16',
//aliyun slb
'100.116.71.0/16',
], Request::HEADER_X_FORWARDED_ALL);
}

View File

@ -81,9 +81,12 @@
code&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: {{$error['code']}} <br>
message : {{$error['message']}}
</div>
<h5>返回内容:</h5>
<iframe style="width: 100%;height: 500px;border: none;" srcdoc='{{$error['resp']->getBody()}}'></iframe>
<hr>
@if($error['resp'])
<h5>返回内容:</h5>
<iframe style="width: 100%;height: 500px;border: none;"
srcdoc='{{$error['resp']->getBody()}}'></iframe>
<hr>
@endif
@endif
@if( !empty($result) )
<h5>Result:</h5>