From de7034accd12a7c45c286c03068d5b131add8768 Mon Sep 17 00:00:00 2001 From: Oleh <65224395+OlehDulebaEpam@users.noreply.github.com> Date: Wed, 6 Dec 2023 12:24:49 +0200 Subject: [PATCH] edited delete-personal-conversation.ts, added error types (#3) --- src/functions/delete-personal-conversation.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/functions/delete-personal-conversation.ts b/src/functions/delete-personal-conversation.ts index 0a850f0..3285013 100644 --- a/src/functions/delete-personal-conversation.ts +++ b/src/functions/delete-personal-conversation.ts @@ -18,6 +18,7 @@ export const handler = async (event: APIGatewayProxyEventV2) => { return { statusCode: 400, body: JSON.stringify({ + type: "InvalidUserDataException", message: 'Header should contain "rs-email", "rs-uid" and "Authorization" parameters.', }), @@ -30,6 +31,7 @@ export const handler = async (event: APIGatewayProxyEventV2) => { return { statusCode: 400, body: JSON.stringify({ + type: "InvalidTokenException", message: 'Header should contain "Authorization" parameter with Bearer code.', }), @@ -42,6 +44,7 @@ export const handler = async (event: APIGatewayProxyEventV2) => { return { statusCode: 400, body: JSON.stringify({ + type: "InvalidFormDataException", message: '"conversationID" parameter should be in query list.', }), };