You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I spent a couple of evenings trying to set up a chalice with two routes, always getting the same error:
botocore.exceptions.ClientError: An error occurred (BadRequestException) when calling the CreateResource operation: Resource's path part must be specified
After some trial and error, I discovered the following:
The '/' route is a lie
If you ask for {hostname}/dev/ you will be rudely rejected.
If you ask for {hostname}/dev it will access route('/')
Trailing / makes chalice cry.
Originally I had two routes:
@app.route('/')
@app.route('/login/')
And got the error above.
However, if I change the second route to @app.route('/login') it works.
Can anyone explain this? Or is this really a bug?
The text was updated successfully, but these errors were encountered:
This appears to be a restriction on API gateway. For example, when I try to create a login/ resource in the console I get: Resource's path part only allow a-zA-Z0-9.- and curly braces at the beginning and the end._
It also seems that trailing slashes "work" without explicitly declaring them.
I spent a couple of evenings trying to set up a chalice with two routes, always getting the same error:
After some trial and error, I discovered the following:
If you ask for {hostname}/dev/ you will be rudely rejected.
If you ask for {hostname}/dev it will access route('/')
Originally I had two routes:
And got the error above.
However, if I change the second route to
@app.route('/login')
it works.Can anyone explain this? Or is this really a bug?
The text was updated successfully, but these errors were encountered: