diff --git a/src/services/request-verification.service.ts b/src/services/request-verification.service.ts index 29210fc..06d14cc 100644 --- a/src/services/request-verification.service.ts +++ b/src/services/request-verification.service.ts @@ -60,9 +60,21 @@ export class RequestVerificationService { } logger.debug(`Bad signature. Rejecting request.`); - response.setHeader('Content-Type', 'application/json'); + response.setHeader('x-amzn-RequestId', request.requestId); + response.setHeader('Content-Type', 'application/xml'); response.status(result.status); - response.json(result.body); + + const responseText = ` + + + Sender + InvalidClientTokenId + ${result.body.message} + + ${request.requestId} + `; + + response.send(responseText); next(); }