Skip to content

Commit

Permalink
Fix exception not created from HEAD requests (#1724)
Browse files Browse the repository at this point in the history
  • Loading branch information
jderusse committed Jun 13, 2024
1 parent d179cc6 commit 2ddbcff
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## NOT RELEASED

### Fixed

- Exception NoSuchKeyException not fired for `HeadObject` request.

## 2.2.1

### Changed
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"ext-dom": "*",
"ext-filter": "*",
"ext-hash": "*",
"async-aws/core": "^1.9"
"async-aws/core": "^1.22"
},
"autoload": {
"psr-4": {
Expand Down
1 change: 1 addition & 0 deletions src/S3Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -1630,6 +1630,7 @@ public function headObject($input): HeadObjectOutput
$input = HeadObjectRequest::create($input);
$response = $this->getResponse($input->request(), new RequestContext(['operation' => 'HeadObject', 'region' => $input->getRegion(), 'exceptionMapping' => [
'NoSuchKey' => NoSuchKeyException::class,
'http_status_code_404' => NoSuchKeyException::class,
]]));

return new HeadObjectOutput($response);
Expand Down

0 comments on commit 2ddbcff

Please sign in to comment.