Skip to content

Instantly share code, notes, and snippets.

@sgarcez
Last active April 23, 2018 15:30
Show Gist options
  • Save sgarcez/b867f8f87b756a1cdfef9bdc03486e7a to your computer and use it in GitHub Desktop.
Save sgarcez/b867f8f87b756a1cdfef9bdc03486e7a to your computer and use it in GitHub Desktop.
x-amazon-apigateway-integration:
#...
responses:
".*\\\"code\\\":\\\"[A-Z_]+_NOT_FOUND\\\".*":
statusCode: "404"
responseParameters:
method.response.header.Content-Type : "'application/json'"
responseTemplates:
application/json: |
#set ($errorMessageObj = $util.parseJson($input.path('$.errorMessage')))
{
"code" : "$errorMessageObj.code",
"message" : "$errorMessageObj.public_message"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment