Skip to content

Commit

Permalink
edited delete-personal-conversation.ts, added error types (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
OlehDulebaEpam authored Dec 6, 2023
1 parent 1bd16b2 commit de7034a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/functions/delete-personal-conversation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.',
}),
Expand All @@ -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.',
}),
Expand All @@ -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.',
}),
};
Expand Down

0 comments on commit de7034a

Please sign in to comment.