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

Frontend sometimes sends auth_id=undefined, resulting in 500 #1011

Open
Hazelfire opened this issue Feb 24, 2022 · 2 comments
Open

Frontend sometimes sends auth_id=undefined, resulting in 500 #1011

Hazelfire opened this issue Feb 24, 2022 · 2 comments

Comments

@Hazelfire
Copy link
Contributor

Hazelfire commented Feb 24, 2022

I've found that the frontend sometimes sends
GET https://guesstimate.herokuapp.com/users?auth0_id=undefined
The backend promptly returns a 500, Internal Server Error.

This clearly seems to be a problem with both the backend and the frontend, in that the backend is giving a 500 on an invalid input and the frontend is creating it. I'm going to see if I can look at the heroku logs for hints on what's happening.

@Hazelfire
Copy link
Contributor Author

Hazelfire commented Feb 24, 2022

Ok, I can reproduce on dev. It seems to pass the id to auth0 without validation. Despite it having {"statusCode": 400 ... } in the error, this is a 500 error.

Line from the repo is here:
https://github.com/getguesstimate/guesstimate-server/blob/d1d8e82e0f7c7fa8d65270cd6eae72ad2badf5b4/lib/authentor.rb#L21
image

@Hazelfire
Copy link
Contributor Author

Ok, that's odd, I managed to get a similar error even when there actually was an auth id...

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