Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix:Improve error handling when a request fails due to the persistent connection being expired #761#854

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
avijitdas126 wants to merge3 commits intozulip:main
base:main
Choose a base branch
Loading
fromavijitdas126:fix/enhance-api-reliability-retries-keepalive-761

Conversation

avijitdas126
Copy link
Collaborator

Enhanced the do_api_query function with a retry mechanism (up to 3 attempts) for transient connection errors, configurable retry delays, and keep-alive headers. It resets the HTTP session on failures, differentiates between network errors and API errors, and maintains backward compatibility while improving reliability with optimized timeouts (90s for long-polling, 15s default).

  • Implement retry mechanism (up to 3 attempts) for transient connection errors
  • Add configurable retry delay and connection keep-alive headers
  • Reset HTTP session on connection failures to ensure clean reconnect
  • Differentiate between retryable network errors and API response errors
  • Set appropriate timeouts (90s for long-polling, 15s default otherwise)
  • Maintain backward compatibility while improving error resilience

Fixes:#761

How did you test this PR?

Self-review checklist
  • Self-reviewed the changes for clarity and maintainability
    (variable names, code reuse, readability, etc.).

Communicate decisions, questions, and potential concerns.

  • Explains differences from previous plans (e.g., issue description).
  • Highlights technical choices and bugs encountered.
  • Calls out remaining decisions and concerns.
  • Automated tests verify logic where appropriate.

Individual commits are ready for review (seecommit discipline).

  • Each commit is a coherent idea.
  • Commit message(s) explain reasoning and motivation for changes.

Completed manual review and testing of the following:

  • Visual appearance of the changes.
  • Responsiveness and internationalization.
  • Strings and tooltips.
  • End-to-end functionality of buttons, interactions and flows.
  • Corner cases, error conditions, and easily imagined bugs.

Enhanced the do_api_query function with a retry mechanism (up to 3 attempts) for transient connection errors, configurable retry delays, and keep-alive headers. It resets the HTTP session on failures, differentiates between network errors and API errors, and maintains backward compatibility while improving reliability with optimized timeouts (90s for long-polling, 15s default).
Added missing whitespace for better readability and fixed minor typos in help_message and alert_move_message. Improved assertions and refactored redundant checks for cleaner test logic.
@zulipbot
Copy link
Member

Hello@avijitdas126, it seems like you have referenced#761 in your pull request description, but you have not referenced them in your commit message description(s). Referencing an issue in a commit message automatically closes the corresponding issue when the commit is merged, which makes the issue tracker easier to manage.

Please rungit commit --amend in your command line client to amend your commit message description withFixes #761..

An example of a correctly-formatted commit:

commit fabd5e450374c8dde65ec35f02140383940fe146Author: zulipbotDate:   Sat Mar 18 13:42:40 2017 -0700    pull requests: Check PR commits reference when issue is referenced.    Fixes #51.

To learn how to write a great commit message, please refer to ourguide.

1 similar comment
@zulipbot
Copy link
Member

Hello@avijitdas126, it seems like you have referenced#761 in your pull request description, but you have not referenced them in your commit message description(s). Referencing an issue in a commit message automatically closes the corresponding issue when the commit is merged, which makes the issue tracker easier to manage.

Please rungit commit --amend in your command line client to amend your commit message description withFixes #761..

An example of a correctly-formatted commit:

commit fabd5e450374c8dde65ec35f02140383940fe146Author: zulipbotDate:   Sat Mar 18 13:42:40 2017 -0700    pull requests: Check PR commits reference when issue is referenced.    Fixes #51.

To learn how to write a great commit message, please refer to ourguide.

@zulipbotzulipbot added size: L and removed size: M labelsFeb 5, 2025
Added missing whitespace for better readability and fixed minor typos in help_message and alert_move_message. Improved assertions and refactored redundant checks for cleaner test logic.
@avijitdas126avijitdas126force-pushed thefix/enhance-api-reliability-retries-keepalive-761 branch from95f88af to078a153CompareFebruary 5, 2025 15:43
@avijitdas126
Copy link
CollaboratorAuthor

@timabbott could you please review this PR?

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Improve error handling when a request fails due to the persistent connection being expired
2 participants
@avijitdas126@zulipbot

[8]ページ先頭

©2009-2025 Movatter.jp