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

Handle timeout exception when fetching raw message. #1486

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Sushmey
Copy link
Collaborator

@Sushmey Sushmey commented Apr 22, 2024

What does this PR do, and why?

ZT freezes when connection is lost while fetching data from the server. This PR attempts to notify the user better about the connection loss by displaying an error message.

Outstanding aspect(s)

We are still open to suggestion about new ways to notify users better about this error. Ideally we'd like to improve interactivity by displaying a loading message till connection comes back, if it does.

External discussion & connections

How did you test this?

  • Manually - Behavioral changes
  • Manually - Visual changes
  • Adapting existing automated tests
  • Adding automated tests for new behavior (or missing tests)
  • Existing automated tests should already cover this (only a refactor of tested code)

Self-review checklist for each commit

  • It is a minimal coherent idea
  • It has a commit summary following the documented style (title & body)
  • It has a commit summary describing the motivation and reasoning for the change
  • It individually passes linting and tests
  • It contains test additions for any new behavior
  • It flows clearly from a previous branch commit, and/or prepares for the next commit

Visual changes

Screenshot 2024-04-23 at 1 22 51 AM

Return a default error response when server call times out.

Amend tests for the same.
Add a try except block to handle timeout exception.
@zulipbot zulipbot added the size: L [Automatic label added by zulipbot] label Apr 22, 2024
@neiljp
Copy link
Collaborator

neiljp commented Apr 24, 2024

@Sushmey Thanks for looking at these issues. I responded to this in the stream.

Note that the first commit doesn't specifically return a default error response - it passes on the exception it obtained back to the caller.

@neiljp neiljp added the PR awaiting update PR has been reviewed & is awaiting update or response to reviewer feedback label May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR awaiting update PR has been reviewed & is awaiting update or response to reviewer feedback size: L [Automatic label added by zulipbot]
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants