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

404 status code on services that include a DbId in the call URL #79

Open
Gabriel-Besombes opened this issue Aug 16, 2023 · 1 comment
Open

Comments

@Gabriel-Besombes
Copy link

Gabriel-Besombes commented Aug 16, 2023

Hi, I have started to try this tool today but encountered issues with all services that include a DbId in the call URL. For example : GET /studies/{studyDbId}. I get 404s on all of these.

I am using the docker version.

I believe it could simply be due to URL encoding issues. Our DbIds are URIs so they may contain special characters like ":" or "/". For example : "dev:id/experiment/test" should be encoded in the URL as "http://localhost:8666/rest/brapi/v1/studies/dev%3Aid%2Fexperiment%2Ftest".

This is a bit hard to verify though as the app doesn't tell the user what URL was called, with what parameters or what the complete response was. I can submit a different issue for an improvement if necessary.

PS : BrAPI version 1.3

@Gabriel-Besombes
Copy link
Author

I was able to fix this issue localy. It looks like the "/" in DbIds cause issues with RestAssured's encoding. I fixed this by storing all DbIds URLencoded and deactivating RestAssured's URLencoding. My fix isn't perfect and I didn't test it properly but I can still make a PR if you are interested.

I also added querry parameters and result logging for help in debugging. This could also be added to the app inteface to help with troubleshooting.

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