-
Notifications
You must be signed in to change notification settings - Fork 75
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
Bad include can return 500 #134
Comments
@MarkESDR could you provide a repo that produces this error? I think that would be easiest to work from. Do you happen to have a solution in mind? |
@doomspork Here is an example repo. For solutions, how about, instead of converting the request include param to an atom to compare, converting the list of valid include params to strings. This allows us to compare the request params and valid params without creating extra atoms |
@MarkESDR we'd love a PR to fix this if you have the time 👍 |
It looks like the smoking gun was in our tests this whole time. Resolves beam-community#134
It looks like the smoking gun was in our tests this whole time. Note that this adds some type specs at the same time in following with the current trend in this lib of gradually adding them as we go. Resolves beam-community#134
According to the includes spec on jsonapi (1), invalid includes should only return 400.
https://github.com/jeregrine/jsonapi/blob/242499eaf42362fa0f1e6602ecc08f9baa7feaad/lib/jsonapi/query_parser.ex#L183
Looks to be due to this line. Based on whether or not the atom exists in the app, the line raises an error only on certain invalid includes
The text was updated successfully, but these errors were encountered: