Skip to content

Commit 126e80a

Browse files
authored
Sort exceptions alphabetically (#1875)
1 parent c2da3c2 commit 126e80a

File tree

2 files changed

+24
-20
lines changed

2 files changed

+24
-20
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
## 2.2.1
610

711
### Changed

src/SsmClient.php

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -144,15 +144,15 @@ public function getParameter($input): GetParameterResult
144144
* '@region'?: string|null,
145145
* }|GetParametersRequest $input
146146
*
147-
* @throws InvalidKeyIdException
148147
* @throws InternalServerErrorException
148+
* @throws InvalidKeyIdException
149149
*/
150150
public function getParameters($input): GetParametersResult
151151
{
152152
$input = GetParametersRequest::create($input);
153153
$response = $this->getResponse($input->request(), new RequestContext(['operation' => 'GetParameters', 'region' => $input->getRegion(), 'exceptionMapping' => [
154-
'InvalidKeyId' => InvalidKeyIdException::class,
155154
'InternalServerError' => InternalServerErrorException::class,
155+
'InvalidKeyId' => InvalidKeyIdException::class,
156156
]]));
157157

158158
return new GetParametersResult($response);
@@ -223,41 +223,41 @@ public function getParametersByPath($input): GetParametersByPathResult
223223
* '@region'?: string|null,
224224
* }|PutParameterRequest $input
225225
*
226-
* @throws InternalServerErrorException
227-
* @throws InvalidKeyIdException
228-
* @throws ParameterLimitExceededException
229-
* @throws TooManyUpdatesException
230-
* @throws ParameterAlreadyExistsException
231226
* @throws HierarchyLevelLimitExceededException
232227
* @throws HierarchyTypeMismatchException
228+
* @throws IncompatiblePolicyException
229+
* @throws InternalServerErrorException
233230
* @throws InvalidAllowedPatternException
231+
* @throws InvalidKeyIdException
232+
* @throws InvalidPolicyAttributeException
233+
* @throws InvalidPolicyTypeException
234+
* @throws ParameterAlreadyExistsException
235+
* @throws ParameterLimitExceededException
234236
* @throws ParameterMaxVersionLimitExceededException
235237
* @throws ParameterPatternMismatchException
236-
* @throws UnsupportedParameterTypeException
237238
* @throws PoliciesLimitExceededException
238-
* @throws InvalidPolicyTypeException
239-
* @throws InvalidPolicyAttributeException
240-
* @throws IncompatiblePolicyException
239+
* @throws TooManyUpdatesException
240+
* @throws UnsupportedParameterTypeException
241241
*/
242242
public function putParameter($input): PutParameterResult
243243
{
244244
$input = PutParameterRequest::create($input);
245245
$response = $this->getResponse($input->request(), new RequestContext(['operation' => 'PutParameter', 'region' => $input->getRegion(), 'exceptionMapping' => [
246-
'InternalServerError' => InternalServerErrorException::class,
247-
'InvalidKeyId' => InvalidKeyIdException::class,
248-
'ParameterLimitExceeded' => ParameterLimitExceededException::class,
249-
'TooManyUpdates' => TooManyUpdatesException::class,
250-
'ParameterAlreadyExists' => ParameterAlreadyExistsException::class,
251246
'HierarchyLevelLimitExceededException' => HierarchyLevelLimitExceededException::class,
252247
'HierarchyTypeMismatchException' => HierarchyTypeMismatchException::class,
248+
'IncompatiblePolicyException' => IncompatiblePolicyException::class,
249+
'InternalServerError' => InternalServerErrorException::class,
253250
'InvalidAllowedPatternException' => InvalidAllowedPatternException::class,
251+
'InvalidKeyId' => InvalidKeyIdException::class,
252+
'InvalidPolicyAttributeException' => InvalidPolicyAttributeException::class,
253+
'InvalidPolicyTypeException' => InvalidPolicyTypeException::class,
254+
'ParameterAlreadyExists' => ParameterAlreadyExistsException::class,
255+
'ParameterLimitExceeded' => ParameterLimitExceededException::class,
254256
'ParameterMaxVersionLimitExceeded' => ParameterMaxVersionLimitExceededException::class,
255257
'ParameterPatternMismatchException' => ParameterPatternMismatchException::class,
256-
'UnsupportedParameterType' => UnsupportedParameterTypeException::class,
257258
'PoliciesLimitExceededException' => PoliciesLimitExceededException::class,
258-
'InvalidPolicyTypeException' => InvalidPolicyTypeException::class,
259-
'InvalidPolicyAttributeException' => InvalidPolicyAttributeException::class,
260-
'IncompatiblePolicyException' => IncompatiblePolicyException::class,
259+
'TooManyUpdates' => TooManyUpdatesException::class,
260+
'UnsupportedParameterType' => UnsupportedParameterTypeException::class,
261261
]]));
262262

263263
return new PutParameterResult($response);

0 commit comments

Comments
 (0)