@@ 174-185 (lines=12) @@ | ||
171 | } |
|
172 | ||
173 | // if no ifCode property then return exception |
|
174 | if (!$error['ifCode']) { |
|
175 | $responseMessage = $this->getErrorMessage($body, $error, $response); |
|
176 | ||
177 | return new BadResponseException( |
|
178 | $responseCode, |
|
179 | $responseMessage, |
|
180 | ($e ? $e->getMessage() : '').' code: '.$responseCode.', message: '.$responseMessage, |
|
181 | $request, |
|
182 | $response, |
|
183 | $e ? $e->getPrevious() : null |
|
184 | ); |
|
185 | } |
|
186 | } else { |
|
187 | $responseCode = $response->getStatusCode(); |
|
188 | } |
|
@@ 190-201 (lines=12) @@ | ||
187 | $responseCode = $response->getStatusCode(); |
|
188 | } |
|
189 | ||
190 | if ($error['ifCode'] == $responseCode) { |
|
191 | $responseMessage = $this->getErrorMessage($body, $error, $response); |
|
192 | ||
193 | return new BadResponseException( |
|
194 | $responseCode, |
|
195 | $responseMessage, |
|
196 | ($e ? $e->getMessage() : '').' code: '.$responseCode.', message: '.$responseMessage, |
|
197 | $request, |
|
198 | $response, |
|
199 | $e ? $e->getPrevious() : null |
|
200 | ); |
|
201 | } |
|
202 | } |
|
203 | } |
|
204 |