-
-
Notifications
You must be signed in to change notification settings - Fork 640
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
Report more info on "bad response from server" #4050
Comments
This is open as #3819. |
Indeed, thanks! Should have looked closer. Just bumped that PR. |
If it's fresh on your mind and you have a moment, could you take a quick look at this question I had, over at #4033 (comment):
|
I think (And then maybe we should serialize the result into a bit of docs.) |
I suspect some of these 4xx errors may be cases where the user is attempting to connect to a server that is not a Zulip realm at all (but, perhaps, used to be). 404s and 401s would certainly be explained by that, and I could see a 400 being a response to a file-upload attempt, too. The 200 on |
Hmm, interesting thought. That's certainly a thing that can happen (I remember we ran across an example of that a few months ago) -- but I'd be a bit surprised if that happened on the user_uploads or users/me/status routes. If the host is no longer a Zulip realm, then In any case, this is a question we can answer. 😉 I linked the specific events I was looking at, and they contain the URLs in question. Fetching
I'll file issues for those latter two. But the user_uploads and users/me/status cases remain mysterious. |
We have the following lines in our API code:
Turns out we get quite a lot of these reports, from a lot of distinct users, where
data
is undefined. So we should debug.This will happen if the body of the server's response is not valid JSON, because of this line:
Some of these are cases of #3567. So for those, we know the cause and we should just fix #3567.
Others remain puzzling and call for debugging:
/api/v1/user_uploads
./api/v1/server_settings?
./api/v1/users/me/status
./api/v1/users/me/apns_device_token
.It's possible there are server bugs where we're for some reason not returning JSON in certain error cases.
It's also possible something else is going on.
A good debugging step would be to edit that
logging.warn
call so that it includes the text of the response. This might require also some editing of theawait response.json().catch(...
line.P1 because of the number of users affected.
The text was updated successfully, but these errors were encountered: