You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When testing an invalid JSON request, API returns HTTP status code 500.
To Reproduce
ERROR Error: The request body is not JSON even though the Content-Type is set to application/json
at parseJsonBody (/var/task/api/webpack:/node_modules/@laconia/event/src/apigateway/parseRequestBody.js:8:11)
at parseRequestBody (/var/task/api/webpack:/node_modules/@laconia/event/src/apigateway/parseRequestBody.js:19:12)
at req (/var/task/api/webpack:/node_modules/@laconia/event/src/apigateway/ApiGatewayEvent.js:11:11)
at e.exports.convert (/var/task/api/webpack:/node_modules/@laconia/adapter-api/src/ApiGatewayBodyInputConverter.js:5:29)
at e.exports.app [as handle] (/var/task/api/webpack:/node_modules/@laconia/adapter-api/src/ApiGatewayEventAdapter.js:17:45)
at Object.r (/var/task/api/webpack:/node_modules/@laconia/core/src/laconia.js:30:14)
Expected behavior
API should return HTTP status code 400 (bad request)
Actual behavior
API returns HTTP status code 500
The text was updated successfully, but these errors were encountered:
Describe the bug
When testing an invalid JSON request, API returns HTTP status code 500.
To Reproduce
Expected behavior
API should return HTTP status code 400 (bad request)
Actual behavior
API returns HTTP status code 500
The text was updated successfully, but these errors were encountered: