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

[API] beatmap info endpoint returns 404 with non-integer wait parameter #140

Open
blimmo opened this issue Jun 5, 2017 · 4 comments
Open
Labels

Comments

@blimmo
Copy link
Contributor

blimmo commented Jun 5, 2017

While using the api, I accidentally called the beatmap-info endpoint with a wait parameter of 7726.763010025024. It took me a while to find out though because I was getting 404 rather than a 400 as I would expect (since non-integers aren't allowed, right?).

@Tillerino
Copy link
Owner

This is interesting. I don't think that the 404 is all to wrong. If you think of it as a "function not found", it does make sense. However it is confusing, I agree.

I'll have to find out what the JAX-RS specification says here and how Jersey implements it. In JAX-RS, resources are uniquely identified by their path not their parameters, so IMO in JAX-RS terms, the resource should be "found" in this case. It might be that JAX-RS didn't specify the behaviour here and that they didn't spend as much thought on this in Jersey. Afterall you'll never have this problem if you use one (Java) interface on both ends, which is probably the most common case for JAX-RS APIs.

Out of curiosity: which programming language are you using and did you generate your API code from the Swagger Spec?

@blimmo
Copy link
Contributor Author

blimmo commented Jun 6, 2017

I'm using python (I'm actually trying to write a wrapper library) and just using the requests module's params parameter to encode the query string. So I didn't use swagger to generate the url, just to remind me which parameters are which :P

@Tillerino
Copy link
Owner

Tillerino commented Jun 6, 2017 via email

@Tillerino
Copy link
Owner

I don't think there's a necessity to fix this, but I'll leave the issue up just in case anybody else makes the stumbles upon this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants