Skip to content

Commit

Permalink
Ensure no behavior change with non arsenal errors processing
Browse files Browse the repository at this point in the history
Issue: ARSN-441
  • Loading branch information
williamlardier committed Nov 26, 2024
1 parent c81f6df commit 732cfa8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/s3routes/routes/routeDELETE.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,10 @@ export default function routeDELETE(
* the object, the errors NoSuchKey and NoSuchVersion should not
* be sent back as a response.
*/
if (err instanceof ArsenalError && !err.is?.NoSuchKey && !err.is?.NoSuchVersion) {
if (err && (
!(err instanceof ArsenalError) ||
(!err.is.NoSuchKey && err.is.NoSuchVersion)
)) {
return routesUtils.responseNoBody(err, corsHeaders,
response, undefined, log);
}
Expand Down

0 comments on commit 732cfa8

Please sign in to comment.