Skip to content

Commit

Permalink
Merge pull request #348 from wri/feat/GTC-1866-custom-timeout
Browse files Browse the repository at this point in the history
GTC-1866: Mention pagination on timeout
  • Loading branch information
gtempus authored Oct 20, 2022
2 parents 8f558a3 + edd630e commit 538438f
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion terraform/modules/api_gateway/resource/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,19 @@ resource "aws_api_gateway_gateway_response" "throttled" {
response_templates = {
"application/json" = "{\"status\":\"failed\",\"message\":\"Exceeded the rate limit for this resource. Please try again later.\"}"
}
}
}

resource "aws_api_gateway_gateway_response" "integration_timeout" {
rest_api_id = var.rest_api_id
status_code = "504"
response_type = "INTEGRATION_TIMEOUT"

response_templates = {
"application/json" = <<EOF
{
"status": "failed",
"message": "$context.error.messageString : Use the pagination query parameters when available. See the API documentation."
}
EOF
}
}

0 comments on commit 538438f

Please sign in to comment.