Skip to content

Commit bcf7669

Browse files
authored
Sort exceptions alphabetically (#1875)
1 parent 9a69c7f commit bcf7669

File tree

2 files changed

+16
-12
lines changed

2 files changed

+16
-12
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66

77
- AWS api-change: New options for how to handle harmful content detected by Amazon Bedrock Guardrails.
88

9+
### Changed
10+
11+
- Sort exception alphabetically.
12+
913
## 1.0.0
1014

1115
First version

src/BedrockRuntimeClient.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -61,30 +61,30 @@ class BedrockRuntimeClient extends AbstractApi
6161
* }|InvokeModelRequest $input
6262
*
6363
* @throws AccessDeniedException
64-
* @throws ResourceNotFoundException
65-
* @throws ThrottlingException
66-
* @throws ModelTimeoutException
6764
* @throws InternalServerException
68-
* @throws ServiceUnavailableException
69-
* @throws ValidationException
65+
* @throws ModelErrorException
7066
* @throws ModelNotReadyException
67+
* @throws ModelTimeoutException
68+
* @throws ResourceNotFoundException
7169
* @throws ServiceQuotaExceededException
72-
* @throws ModelErrorException
70+
* @throws ServiceUnavailableException
71+
* @throws ThrottlingException
72+
* @throws ValidationException
7373
*/
7474
public function invokeModel($input): InvokeModelResponse
7575
{
7676
$input = InvokeModelRequest::create($input);
7777
$response = $this->getResponse($input->request(), new RequestContext(['operation' => 'InvokeModel', 'region' => $input->getRegion(), 'exceptionMapping' => [
7878
'AccessDeniedException' => AccessDeniedException::class,
79-
'ResourceNotFoundException' => ResourceNotFoundException::class,
80-
'ThrottlingException' => ThrottlingException::class,
81-
'ModelTimeoutException' => ModelTimeoutException::class,
8279
'InternalServerException' => InternalServerException::class,
83-
'ServiceUnavailableException' => ServiceUnavailableException::class,
84-
'ValidationException' => ValidationException::class,
80+
'ModelErrorException' => ModelErrorException::class,
8581
'ModelNotReadyException' => ModelNotReadyException::class,
82+
'ModelTimeoutException' => ModelTimeoutException::class,
83+
'ResourceNotFoundException' => ResourceNotFoundException::class,
8684
'ServiceQuotaExceededException' => ServiceQuotaExceededException::class,
87-
'ModelErrorException' => ModelErrorException::class,
85+
'ServiceUnavailableException' => ServiceUnavailableException::class,
86+
'ThrottlingException' => ThrottlingException::class,
87+
'ValidationException' => ValidationException::class,
8888
]]));
8989

9090
return new InvokeModelResponse($response);

0 commit comments

Comments
 (0)