Skip to content

Commit f7a3e68

Browse files
committed
fix:fix return error
1 parent 4a43ef3 commit f7a3e68

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/Qiniu/Storage/ArgusManager.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ public function censorStatus($jobid)
7575
$url = $scheme . Config::ARGUS_HOST . "/v3/jobs/video/$jobid";
7676
$response = $this->get($url);
7777
if (!$response->ok()) {
78+
print("statusCode: " . $response->statusCode);
7879
return array(null, new Error($url, $response));
7980
}
8081
return array($response->json(), null);
@@ -98,11 +99,8 @@ private function arPost($path, $body = null)
9899
private function get($url)
99100
{
100101
$headers = $this->auth->authorizationV2($url, 'GET');
101-
$ret = Client::get($url, $headers);
102-
if (!$ret->ok()) {
103-
return array(null, new Error($url, $ret));
104-
}
105-
return $ret;
102+
103+
return Client::get($url, $headers);
106104
}
107105

108106
private function post($url, $body)
@@ -111,7 +109,7 @@ private function post($url, $body)
111109
$headers['Content-Type']='application/json';
112110
$ret = Client::post($url, $body, $headers);
113111
if (!$ret->ok()) {
114-
print($ret->statusCode);
112+
print("statusCode: " . $ret->statusCode);
115113
return array(null, new Error($url, $ret));
116114
}
117115
$r = ($ret->body === null) ? array() : $ret->json();

0 commit comments

Comments
 (0)