🔥 3-day streak
AWS Certified Developer - Associate89 / 150
Question 89 of 150

A developer builds a REST API using API Gateway with a Lambda proxy integration (AWS_PROXY). When the Lambda function encounters a validation error, the developer wants API Gateway to return an HTTP 400 status with a custom JSON error body to the client. Currently, all responses—including handled errors—return HTTP 200. What is the correct way to make the function return a 400 status to the client?

Reviewed for accuracy · Report an issueNext question