src/V1/OmsApi.php 1 location
|
@@ 93-102 (lines=10) @@
|
90 |
|
return (string) $result->getBody(); |
91 |
|
} |
92 |
|
|
93 |
|
private function handleRequestException(\Throwable $exception): \Throwable |
94 |
|
{ |
95 |
|
if ($exception instanceof BadResponseException) { |
96 |
|
$response = (string) $exception->getResponse()->getBody(); |
97 |
|
|
98 |
|
return OmsRequestErrorException::becauseOfError($response, $exception); |
99 |
|
} |
100 |
|
|
101 |
|
return $exception; |
102 |
|
} |
103 |
|
} |
104 |
|
|
src/V2/OmsApi.php 1 location
|
@@ 108-117 (lines=10) @@
|
105 |
|
return (string) $result->getBody(); |
106 |
|
} |
107 |
|
|
108 |
|
private function handleRequestException(\Throwable $exception): \Throwable |
109 |
|
{ |
110 |
|
if ($exception instanceof BadResponseException) { |
111 |
|
$response = (string) $exception->getResponse()->getBody(); |
112 |
|
|
113 |
|
return OmsRequestErrorException::becauseOfError($response, $exception); |
114 |
|
} |
115 |
|
|
116 |
|
return $exception; |
117 |
|
} |
118 |
|
} |
119 |
|
|