awslabs / aws-api-gateway-developer-portal

A Serverless Developer Portal for easily publishing and cataloging APIs
Apache License 2.0
930 stars 401 forks source link

Unable to enable an API stage, in Admin section, if the Stage's name contains an underscore #310

Open thkapasi opened 5 years ago

thkapasi commented 5 years ago

If the APIs Stage name contains an underscore character, then the API Gateway hosted API stage is not able to be enabled for displaying in the API catalog page.

echo-bravo-yahoo commented 5 years ago

Hey! I was able to reproduce this. For my own reference later, this is the behavior:

Call hangs indefinitely, and backend lambda times out at 30 seconds (we should handle errors by terminating the lambda; why aren't we doing that here?)

Lambda stack trace:

2019-09-17T20:15:42.000Z a5ed93f1-3862-404a-8776-1784d84ff197 (node:1) UnhandledPromiseRejectionWarning: NotFoundException: Invalid stage identifier specified
at Object.extractError (/var/task/node_modules/aws-sdk/lib/protocol/json.js:48:27)
at Request.extractError (/var/task/node_modules/aws-sdk/lib/protocol/rest_json.js:52:8)
at Request.callListeners (/var/task/node_modules/aws-sdk/lib/sequential_executor.js:109:20)
at Request.emit (/var/task/node_modules/aws-sdk/lib/sequential_executor.js:81:10)
at Request.emit (/var/task/node_modules/aws-sdk/lib/request.js:683:14)
at Request.transition (/var/task/node_modules/aws-sdk/lib/request.js:22:10)
at AcceptorStateMachine.runTo (/var/task/node_modules/aws-sdk/lib/state_machine.js:14:12)
at /var/task/node_modules/aws-sdk/lib/state_machine.js:26:10
at Request.<anonymous> (/var/task/node_modules/aws-sdk/lib/request.js:38:9)
at Request.<anonymous> (/var/task/node_modules/aws-sdk/lib/request.js:685:12)
jakobnordztrom commented 5 years ago

Created pr 311 to fix this. Please review.