I am using a DescribeExecution aws step function integration for api gateway. I cannot update custom mapping template for 400 status if the body of the request contains non existing arn.
I am sending: POST /endpoint/path with body {"executionArn": "abcdef}. When bad request is returned I am getting:
{
type: BadRequest
status: "Incorrect body parameters"
}
Description
I am not able to modify mapping template for 400 integration response.
According to documentation there is no way to update the template separately for 200 & 400 responses.
This updates the 200 integration response. But I want to modify the template for 400 as well. I tried the standard statusCodes for serveless way but it does not work.
I also tried to override the default gateway status codes for this, but it does not work (I overrided 4xx, 429, 400 for default gateway responses). I have default gateway responses for application/json defined as:
{
type: BadRequest
status: "Incorrect body parameters"
}
It still returns. Mapping template for 400 is not visibile in the aws console.
This is a (Bug Report / Feature Proposal)
I am using a DescribeExecution aws step function integration for api gateway. I cannot update custom mapping template for 400 status if the body of the request contains non existing arn.
I am sending: POST /endpoint/path with body {"executionArn": "abcdef}. When bad request is returned I am getting:
I would like to get:
Description
I am not able to modify mapping template for 400 integration response. According to documentation there is no way to update the template separately for 200 & 400 responses.
My code:
This updates the 200 integration response. But I want to modify the template for 400 as well. I tried the standard statusCodes for serveless way but it does not work.
I tried according to serverless docs:
I also tried to override the default gateway status codes for this, but it does not work (I overrided 4xx, 429, 400 for default gateway responses). I have default gateway responses for application/json defined as:
It still returns. Mapping template for 400 is not visibile in the aws console.
If it occurrs that there is a way to do that, please UPDATE documentation, because it is a common usecase.