-
Notifications
You must be signed in to change notification settings - Fork 112
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
Comments
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? |
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 |
Try it! AFAICT, swagger's python code generator is decent. It also gives
you async calls right off the bat.
…On Tue, Jun 6, 2017 at 11:21 AM blimmo ***@***.***> wrote:
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
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#140 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABL9ZYrEX8JiPwUI5vwuUAXlv-b6a0Wkks5sBRorgaJpZM4NwmcE>
.
|
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 |
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?).
The text was updated successfully, but these errors were encountered: