Timeline for 400 - Bad Request - Invalid URL errors with HTML response
Current License: CC BY-SA 4.0
16 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jul 22, 2021 at 14:58 | history | edited | Brian Nickel |
edited tags
|
|
Jul 22, 2021 at 14:58 | answer | added | Brian Nickel | timeline score: 5 | |
Jul 21, 2021 at 8:34 | comment | added | Martin Prikryl |
@BrianNickel I'm seeing the problem for a week now too. From some experiments, I can reproduce the problem on /2.3/questions/ URLs (and others) with message list with 30 IDs totaling 268 chars (the list only). Example of such URL: pastebin.com/biHBsjsC – When I remove one message ID, the problem seems to stop happening. I've seen a similar issue right after 2.3 API release. But it was less frequent and I didn't investigate back then closer. And the problem disappeared after a while. Now it's back and much more frequent (5-10%). Before there was no problem with URLs 900 chars long.
|
|
Jul 20, 2021 at 18:38 | comment | added | Brian Nickel | @Makyen My theory would be that the request isn't pinned to a specific server and the different servers have different baseline configurations for max URL length. The error message is happening before we reach the application code and the message is just IIS's way of saying it can't interpret the URL. If it got past that, we'd end up with JSON. | |
Jul 19, 2021 at 22:03 | comment | added | Makyen |
@BrianNickel Would that be causing an intermittent issue? In the cases I have this problem, I can repeat the exact request and have it work. Usually, if a URL is hitting a length limit, that's ahard failure, not an intermittent failure. I'd note that this is, at least for me, intermingled with the CORS issue, which others have also experienced. I'd note that, in the past, I've also gotten similar responses when I've been hitting the SE API fairly hard, and got these, even when obeying backoff . In those cases, it's appeared to be a secondary rate limiting scheme.
|
|
Jul 19, 2021 at 21:10 | comment | added | Brian Nickel | I'll be looking into this but my gut feeling is that the URL is just too long. Historically, the maximum URL length was 923 characters (or maybe bytes?) but I'm not sure what it's currently set at. In the iOS app, I did batching of requests like this to limit the URL length. | |
Jul 19, 2021 at 18:53 | comment | added | Makyen | @double-beep While this might be easier to reproduce with larger requests, I thought I'd seen it even on some requests which had quite short URLs (e.g. with a single post ID). | |
Jul 19, 2021 at 18:40 | comment | added | double-beep | Probably related to Using a custom filter with a lot of tags throws an error on refreshing the page, as shorter URLs work just fine (for me at least). | |
Jul 19, 2021 at 14:11 | comment | added | rene♦ | @Makyen I already took care of that earlier. Stack Apps is monitored now for bugs and status review. Changed shortly after we got our diamonds here. See also: stackapps.com/a/8979 | |
Jul 19, 2021 at 13:51 | comment | added | Makyen | It may be better to have this on MSE, rather than here. At least in the past, reports of issues have been much more likely to be addressed if they're on MSE, rather than here or MSO. However, my most notable experiences with that were prior to the advent of the status-review tag. I'm unsure if the existence of status-review will be sufficient to overcome the bias for looking on MSE for API/network-wide issues. | |
Jul 19, 2021 at 13:42 | comment | added | rene♦ | @Makyen for cors I had another bug open: meta.stackexchange.com/questions/364500/… | |
Jul 19, 2021 at 13:41 | comment | added | Makyen |
I'm also routinely getting errors on both the 2.2 and 2.3 API for at least days, if not weeks. The errors will commonly be CORS errors, which in the past the SE API has appeared to use as a secondary method of rate limiting (effectively, if not intentionally). If I disable CORS, then I get the "Bad Request" response. However, I used to really only get these when having a lot of requests in flight at the same time (i.e. on one script which was specifically written to be able to hit the questions endpoint fairly hard). At this point, I'm getting such errors on routine, single requests.
|
|
Jul 19, 2021 at 9:55 | history | edited | rene♦ |
edited tags
|
|
Jul 19, 2021 at 9:55 | comment | added | rene♦ | I repro-ed this, as in: it works now and then ... | |
Jul 19, 2021 at 9:16 | history | edited | Glorfindel♦ | CC BY-SA 4.0 |
added 64 characters in body; edited tags
|
Jul 19, 2021 at 8:43 | history | asked | Glorfindel♦ | CC BY-SA 4.0 |