The api gateway can return different status codes depending on the selection-pattern specified. Basically, when a lambda fails, the error message is inspected and matched on the selection patterns specified on the api gateway. currently, most of the apis just have the successful method response configured.