Skip to content

Commit

Permalink
Merge branch 'bugfix/ARSN-441' into tmp/octopus/w/8.2/bugfix/ARSN-441
Browse files Browse the repository at this point in the history
  • Loading branch information
bert-e committed Nov 26, 2024
2 parents 43ada9b + c95d269 commit 3b71f76
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/s3routes/routesUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -730,7 +730,7 @@ export function errorHtmlResponse(
}

log.trace('sending generic html error page',
{ err });
{ error });
setCommonResponseHeaders(corsHeaders, response, log);
response.writeHead(error.code, { 'Content-type': 'text/html' });
const html: string[] = [];
Expand Down Expand Up @@ -800,9 +800,9 @@ export function errorHeaderResponse(
error = errors.InternalError.customizeDescription(err.message);
}
log.trace('sending error header response',
{ err });
{ error });
setCommonResponseHeaders(corsHeaders, response, log);
response.setHeader('x-amz-error-code', err.message);
response.setHeader('x-amz-error-code', error.message);
response.setHeader('x-amz-error-message', error.description);
response.writeHead(error.code);
return response.end(() => {
Expand Down Expand Up @@ -941,9 +941,9 @@ export function redirectRequestOnError(
if (method === 'HEAD') {
return errorHeaderResponse(error, response, corsHeaders, log);
}
response.setHeader('x-amz-error-code', err.message);
response.setHeader('x-amz-error-code', error.message);
response.setHeader('x-amz-error-message', error.description);
return errorHtmlResponse(err, false, '', response, corsHeaders, log);
return errorHtmlResponse(error, false, '', response, corsHeaders, log);
}

// This is reached only for website error document (GET only)
Expand Down

0 comments on commit 3b71f76

Please sign in to comment.