Skip to content

Unable to change status code within the integration response to 201Β #179

@FrederikPriede

Description

@FrederikPriede

I am unable to change the http status code within the integration response to any other value than 200, 400 or 500. My configuration is pretty identical to the one found in the documentation and currently looks like this:

sqs:
  cors: true
  method: post
  path: /v1/some/awesome/path
  queueName: !GetAtt ExternalUpdatesQueue.QueueName
  response:
    - statusCode: 200
      selectionPattern: '2\d{2}'
      responseTemplates:
        application/json: |-
          {"success": true}

Everything works as expected and I get the expected result when calling the API. But when I try to change the resulting status code to 201, I get the following error:

Execution failed due to configuration error: Output mapping refers to an invalid method response: 201

As far as I understand, I have to add a Method Response in order to allow any other status code than 200, 400 or 500. How can I do that? Or am I limited to 200, 400 and 500 when using this plugin? Thanks in advance, any help is appreciated 😸.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions