Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
benzekrimaha committed Nov 28, 2024
1 parent 71dec56 commit 58ffd77
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/s3routes/routesUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,14 @@ export const XMLResponseBackend = {
) {
setCommonResponseHeaders(corsHeaders, response, log);
let error: ArsenalError;
let description: string;
if (errCode instanceof ArsenalError) {
error = errCode;
description = errCode.description;
} else {
error = errors.InternalError.customizeDescription(errCode.message);
description = errCode.message;
}
const description = error.description;
// early return to avoid extra headers and XML data
if (error.code === 304) {
response.writeHead(error.code);
Expand Down

0 comments on commit 58ffd77

Please sign in to comment.