Skip to content

Commit adabd00

Browse files
authored
Sort exceptions alphabetically (#1875)
1 parent 2e131c8 commit adabd00

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
### Changed
66

7+
- Sort exception alphabetically.
78
- AWS enhancement: Documentation updates.
89

910
## 2.8.0

src/S3Client.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1524,15 +1524,15 @@ public function getBucketEncryption($input): GetBucketEncryptionOutput
15241524
* '@region'?: string|null,
15251525
* }|GetObjectRequest $input
15261526
*
1527-
* @throws NoSuchKeyException
15281527
* @throws InvalidObjectStateException
1528+
* @throws NoSuchKeyException
15291529
*/
15301530
public function getObject($input): GetObjectOutput
15311531
{
15321532
$input = GetObjectRequest::create($input);
15331533
$response = $this->getResponse($input->request(), new RequestContext(['operation' => 'GetObject', 'region' => $input->getRegion(), 'exceptionMapping' => [
1534-
'NoSuchKey' => NoSuchKeyException::class,
15351534
'InvalidObjectState' => InvalidObjectStateException::class,
1535+
'NoSuchKey' => NoSuchKeyException::class,
15361536
]]));
15371537

15381538
return new GetObjectOutput($response);
@@ -2599,19 +2599,19 @@ public function putBucketTagging($input): Result
25992599
* '@region'?: string|null,
26002600
* }|PutObjectRequest $input
26012601
*
2602+
* @throws EncryptionTypeMismatchException
26022603
* @throws InvalidRequestException
26032604
* @throws InvalidWriteOffsetException
26042605
* @throws TooManyPartsException
2605-
* @throws EncryptionTypeMismatchException
26062606
*/
26072607
public function putObject($input): PutObjectOutput
26082608
{
26092609
$input = PutObjectRequest::create($input);
26102610
$response = $this->getResponse($input->request(), new RequestContext(['operation' => 'PutObject', 'region' => $input->getRegion(), 'exceptionMapping' => [
2611+
'EncryptionTypeMismatch' => EncryptionTypeMismatchException::class,
26112612
'InvalidRequest' => InvalidRequestException::class,
26122613
'InvalidWriteOffset' => InvalidWriteOffsetException::class,
26132614
'TooManyParts' => TooManyPartsException::class,
2614-
'EncryptionTypeMismatch' => EncryptionTypeMismatchException::class,
26152615
]]));
26162616

26172617
return new PutObjectOutput($response);

0 commit comments

Comments
 (0)