|
16 | 16 | use SimpleAsFuck\ApiToolkit\Model\Client\BadRequestApiException; |
17 | 17 | use SimpleAsFuck\ApiToolkit\Model\Client\ConflictApiException; |
18 | 18 | use SimpleAsFuck\ApiToolkit\Model\Client\ForbiddenApiException; |
| 19 | +use SimpleAsFuck\ApiToolkit\Model\Client\GoneApiException; |
19 | 20 | use SimpleAsFuck\ApiToolkit\Model\Client\NotFoundApiException; |
20 | 21 | use SimpleAsFuck\ApiToolkit\Model\Client\Request; |
21 | 22 | use SimpleAsFuck\ApiToolkit\Model\Client\Response; |
@@ -143,22 +144,21 @@ public function waitRaw(PromiseInterface $promise): Response |
143 | 144 | if ($response->getStatusCode() === HttpCodes::HTTP_BAD_REQUEST) { |
144 | 145 | throw new BadRequestApiException($response, $message, $exception); |
145 | 146 | } |
146 | | - |
147 | 147 | if ($response->getStatusCode() === HttpCodes::HTTP_UNAUTHORIZED) { |
148 | 148 | throw new UnauthorizedApiException($response, $message, $exception); |
149 | 149 | } |
150 | | - |
151 | 150 | if ($response->getStatusCode() === HttpCodes::HTTP_FORBIDDEN) { |
152 | 151 | throw new ForbiddenApiException($response, $message, $exception); |
153 | 152 | } |
154 | | - |
155 | 153 | if ($response->getStatusCode() === HttpCodes::HTTP_NOT_FOUND) { |
156 | 154 | throw new NotFoundApiException($response, $message, $exception); |
157 | 155 | } |
158 | | - |
159 | 156 | if ($response->getStatusCode() === HttpCodes::HTTP_CONFLICT) { |
160 | 157 | throw new ConflictApiException($response, $message, $exception); |
161 | 158 | } |
| 159 | + if ($response->getStatusCode() === HttpCodes::HTTP_GONE) { |
| 160 | + throw new GoneApiException($response, $message, $exception); |
| 161 | + } |
162 | 162 |
|
163 | 163 | throw new ResponseApiException($response, $message, $exception); |
164 | 164 | } |
|
0 commit comments