Skip to content

Commit 7cfd79c

Browse files
authored
Sort exceptions alphabetically (#1875)
1 parent 6467b90 commit 7cfd79c

File tree

2 files changed

+18
-14
lines changed

2 files changed

+18
-14
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.1.0
610

711
### Added

src/SsoOidcClient.php

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -45,33 +45,33 @@ class SsoOidcClient extends AbstractApi
4545
* '@region'?: string|null,
4646
* }|CreateTokenRequest $input
4747
*
48-
* @throws InvalidRequestException
48+
* @throws AccessDeniedException
49+
* @throws AuthorizationPendingException
50+
* @throws ExpiredTokenException
51+
* @throws InternalServerException
4952
* @throws InvalidClientException
5053
* @throws InvalidGrantException
51-
* @throws UnauthorizedClientException
52-
* @throws UnsupportedGrantTypeException
54+
* @throws InvalidRequestException
5355
* @throws InvalidScopeException
54-
* @throws AuthorizationPendingException
5556
* @throws SlowDownException
56-
* @throws AccessDeniedException
57-
* @throws ExpiredTokenException
58-
* @throws InternalServerException
57+
* @throws UnauthorizedClientException
58+
* @throws UnsupportedGrantTypeException
5959
*/
6060
public function createToken($input): CreateTokenResponse
6161
{
6262
$input = CreateTokenRequest::create($input);
6363
$response = $this->getResponse($input->request(), new RequestContext(['operation' => 'CreateToken', 'region' => $input->getRegion(), 'exceptionMapping' => [
64-
'InvalidRequestException' => InvalidRequestException::class,
64+
'AccessDeniedException' => AccessDeniedException::class,
65+
'AuthorizationPendingException' => AuthorizationPendingException::class,
66+
'ExpiredTokenException' => ExpiredTokenException::class,
67+
'InternalServerException' => InternalServerException::class,
6568
'InvalidClientException' => InvalidClientException::class,
6669
'InvalidGrantException' => InvalidGrantException::class,
67-
'UnauthorizedClientException' => UnauthorizedClientException::class,
68-
'UnsupportedGrantTypeException' => UnsupportedGrantTypeException::class,
70+
'InvalidRequestException' => InvalidRequestException::class,
6971
'InvalidScopeException' => InvalidScopeException::class,
70-
'AuthorizationPendingException' => AuthorizationPendingException::class,
7172
'SlowDownException' => SlowDownException::class,
72-
'AccessDeniedException' => AccessDeniedException::class,
73-
'ExpiredTokenException' => ExpiredTokenException::class,
74-
'InternalServerException' => InternalServerException::class,
73+
'UnauthorizedClientException' => UnauthorizedClientException::class,
74+
'UnsupportedGrantTypeException' => UnsupportedGrantTypeException::class,
7575
]]));
7676

7777
return new CreateTokenResponse($response);

0 commit comments

Comments
 (0)