File tree 2 files changed +2
-2
lines changed
typescript/api-cors-lambda-crud-dynamodb/lambdas
2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ export const handler = async (event: any = {}): Promise<any> => {
26
26
return { statusCode : 201 , body : '' } ;
27
27
} catch ( dbError ) {
28
28
const errorResponse = dbError . code === 'ValidationException' && dbError . message . includes ( 'reserved keyword' ) ?
29
- DYNAMODB_EXECUTION_ERROR : RESERVED_RESPONSE ;
29
+ RESERVED_RESPONSE : DYNAMODB_EXECUTION_ERROR ;
30
30
return { statusCode : 500 , body : errorResponse } ;
31
31
}
32
32
} ;
Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ export const handler = async (event: any = {}): Promise<any> => {
48
48
return { statusCode : 204 , body : '' } ;
49
49
} catch ( dbError ) {
50
50
const errorResponse = dbError . code === 'ValidationException' && dbError . message . includes ( 'reserved keyword' ) ?
51
- DYNAMODB_EXECUTION_ERROR : RESERVED_RESPONSE ;
51
+ RESERVED_RESPONSE : DYNAMODB_EXECUTION_ERROR ;
52
52
return { statusCode : 500 , body : errorResponse } ;
53
53
}
54
54
} ;
You can’t perform that action at this time.
0 commit comments