Skip to content

Commit 39340b5

Browse files
authored
Sort exceptions alphabetically (#1875)
1 parent 19e1ac6 commit 39340b5

File tree

2 files changed

+14
-10
lines changed

2 files changed

+14
-10
lines changed

CHANGELOG.md

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

33
## NOT RELEASED
44

5+
### Changed
6+
7+
- Sort exception alphabetically.
8+
59
## 1.25.0
610

711
### Added

src/Sts/StsClient.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -125,19 +125,19 @@ class StsClient extends AbstractApi
125125
* '@region'?: string|null,
126126
* }|AssumeRoleRequest $input
127127
*
128+
* @throws ExpiredTokenException
128129
* @throws MalformedPolicyDocumentException
129130
* @throws PackedPolicyTooLargeException
130131
* @throws RegionDisabledException
131-
* @throws ExpiredTokenException
132132
*/
133133
public function assumeRole($input): AssumeRoleResponse
134134
{
135135
$input = AssumeRoleRequest::create($input);
136136
$response = $this->getResponse($input->request(), new RequestContext(['operation' => 'AssumeRole', 'region' => $input->getRegion(), 'exceptionMapping' => [
137+
'ExpiredTokenException' => ExpiredTokenException::class,
137138
'MalformedPolicyDocument' => MalformedPolicyDocumentException::class,
138139
'PackedPolicyTooLarge' => PackedPolicyTooLargeException::class,
139140
'RegionDisabledException' => RegionDisabledException::class,
140-
'ExpiredTokenException' => ExpiredTokenException::class,
141141
]]));
142142

143143
return new AssumeRoleResponse($response);
@@ -273,24 +273,24 @@ public function assumeRole($input): AssumeRoleResponse
273273
* '@region'?: string|null,
274274
* }|AssumeRoleWithWebIdentityRequest $input
275275
*
276-
* @throws MalformedPolicyDocumentException
277-
* @throws PackedPolicyTooLargeException
278-
* @throws IDPRejectedClaimException
276+
* @throws ExpiredTokenException
279277
* @throws IDPCommunicationErrorException
278+
* @throws IDPRejectedClaimException
280279
* @throws InvalidIdentityTokenException
281-
* @throws ExpiredTokenException
280+
* @throws MalformedPolicyDocumentException
281+
* @throws PackedPolicyTooLargeException
282282
* @throws RegionDisabledException
283283
*/
284284
public function assumeRoleWithWebIdentity($input): AssumeRoleWithWebIdentityResponse
285285
{
286286
$input = AssumeRoleWithWebIdentityRequest::create($input);
287287
$response = $this->getResponse($input->request(), new RequestContext(['operation' => 'AssumeRoleWithWebIdentity', 'region' => $input->getRegion(), 'exceptionMapping' => [
288-
'MalformedPolicyDocument' => MalformedPolicyDocumentException::class,
289-
'PackedPolicyTooLarge' => PackedPolicyTooLargeException::class,
290-
'IDPRejectedClaim' => IDPRejectedClaimException::class,
288+
'ExpiredTokenException' => ExpiredTokenException::class,
291289
'IDPCommunicationError' => IDPCommunicationErrorException::class,
290+
'IDPRejectedClaim' => IDPRejectedClaimException::class,
292291
'InvalidIdentityToken' => InvalidIdentityTokenException::class,
293-
'ExpiredTokenException' => ExpiredTokenException::class,
292+
'MalformedPolicyDocument' => MalformedPolicyDocumentException::class,
293+
'PackedPolicyTooLarge' => PackedPolicyTooLargeException::class,
294294
'RegionDisabledException' => RegionDisabledException::class,
295295
]]));
296296

0 commit comments

Comments
 (0)