CORS errors specifically when using the new API Gateway UI
0
When creating a new resource/GET method using the new API Gateway UI, I get "Internal Server Error 500" on my preflight requests (CORS is enabled). If I create the resource and method with the old (soon to be replaced UI), there are no errors.
I enabled CloudWatch logs to look into the issue further, and the exact error thrown is: "Execution failed due to configuration error: Unable to parse statusCode. It should be an integer that is defined in the request template."
For now, I will continue to develop using the old UI. What is the solution when using the new UI? I think it's a force switch in a month or less.
create a react app and configure it to make api calls using Redux/Thunks
make a doGet and execute
Result: preflight headers in chrome are identical to working headers from another resource except they are 500 Internal Server Error. If you dig into cloud watch, you'll find it failed with this error: "Execution failed due to configuration error: Unable to parse statusCode. It should be an integer that is defined in the request template."
Follow above steps, but use the old UI: no errors.
Perhaps worth noting that VTL has a lot of exceptions in the scripting windows. I've found if you ignore the warnings and just save it, it works as intended.
Hi,
I am sorry to hear that. Could you describe how you created the API to reproduce the problem?
Sure. In the new UI:
How I am testing:
Result: preflight headers in chrome are identical to working headers from another resource except they are 500 Internal Server Error. If you dig into cloud watch, you'll find it failed with this error: "Execution failed due to configuration error: Unable to parse statusCode. It should be an integer that is defined in the request template."
Follow above steps, but use the old UI: no errors.
Perhaps worth noting that VTL has a lot of exceptions in the scripting windows. I've found if you ignore the warnings and just save it, it works as intended.