-
-
Notifications
You must be signed in to change notification settings - Fork 71
Open
Labels
complexity: averageNot particularly hard, not particularly trivial.Not particularly hard, not particularly trivial.
Milestone
Description
Currently, our handling of failed AJAX request responses is all over the place: sometimes we fail silently and log to console; sometimes we create a notification with the HTTP status code; sometimes we rely on the message the server sends in the response payload.
Even when we do rely on the message field, oftentimes the server does not actually send one. Oh, and also sometimes we rely on the error field instead.
This issue is to track our efforts for streamlining our handling of failed AJAX requests:
- flag escalation (hardcoded);
- user soft deletion (jQuery artifact);
- category change (hardcoded + bare HTTP status code);
- category post type update (hardcoded + bare HTTP status code);
- category post type deletion (hardcoded + bare HTTP status code);
- question closure (hardcoded + bare HTTP status code OR hardcoded + server-sent
message); - flagging (hardcoded + server-sent
message); - flag escalation (hardcoded);
- flag handling (hardcoded + bare HTTP status code OR hardcoded + server-sent
message); - post image upload (hardcoded OR server-sent
errorOR hardcoded + bare HTTP status code); - suggested edit handling (hardcoded + server-sent
message); - tag renaming (hardcoded + bare HTTP status code);
- user ability / role granting / revoking (hardcoded + server-sent
message); - voting (hardcoded + server-sent
message+ bare HTTP status code); - Judaism-specific: suggesting reference (hardcoded);
- saving user preferences (console-only);
I've already added a centralized handleJSONResponse API for error handling, we just need to connect it & align server responses with it.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
complexity: averageNot particularly hard, not particularly trivial.Not particularly hard, not particularly trivial.