Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
FrederikPriede opened this issue Aug 31, 2022 · 0 comments
Open

Comments

@FrederikPriede
Copy link

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 😸.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant