You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Improve error handling when a request fails due to the persistent connection being expired #761
Some networks drop long-lived inactive TCP connections, which can lead to connection errors when using the Zulip API bindings for some persistent jobs. We should ideally either enable a keep-alive, or perhaps a transparent retry for this class of connection error.
Welcome to Zulip, @Beanpen! We just sent you an invite to collaborate on this repository at https://github.com/zulip/python-zulip-api/invitations. Please accept this invite in order to claim this issue and begin a fun, rewarding experience contributing to Zulip!
Here's some tips to get you off to a good start:
Join me on the Zulip developers' server, to get help, chat about this issue, and meet the other developers.
As you work on this issue, you'll also want to refer to the Zulip code contribution guide, as well as the rest of the developer documentation on that site.
See you on the other side (that is, the pull request side)!
Hi @timabbott I wonder if you mean to remove all the alias of "client = zulip.Client(...)" and instead directly call "zulip.Client(...)" in all files. Thank you!
@Beanpen You have been unassigned from this issue because you have not made any updates for over 14 days. Please feel free to reclaim the issue if you decide to pick up again. Thanks!
Welcome to Zulip, @ryansong13! We just sent you an invite to collaborate on this repository at https://github.com/zulip/python-zulip-api/invitations. Please accept this invite in order to claim this issue and begin a fun, rewarding experience contributing to Zulip!
Here's some tips to get you off to a good start:
Join me on the Zulip developers' server, to get help, chat about this issue, and meet the other developers.
As you work on this issue, you'll also want to refer to the Zulip code contribution guide, as well as the rest of the developer documentation on that site.
See you on the other side (that is, the pull request side)!
Welcome to Zulip, @HeetRanpura! By picking up a Zulip issue, you're promising to do your best to follow Zulip's contributing guidelines. Neglecting to do so wastes maintainer time, and may result in being banned from contributing to Zulip.
To get started:
Work through all the "Prior to picking up your first issue" sections of the Zulip contributor guide.
Post a comment here describing your plan for how to approach this issue. Before you claim an issue, you should be confident that you will be able to tackle it effectively.
The issue will be assigned to you when all three steps have been completed. If you get stuck, you can always @zulipbot abandon this issue, and pick a different one.
If someone else claims this issue while you're working through the checklist, no worries! You can contribute by providing feedback on their pull request. If you’ve made good progress in understanding part of the codebase, you can also find another “help wanted” issue in the same area to work on.
@zulipbot
Hi! Here's my plan for approaching this issue.
I'll start by reproducing the issue locally and identifying the request path where an expired persistent connection causes the failure. From there, I'll trace how the exception is propagated through the client to understand where the current error handling can be improved.
I'll also review the connection management and request logic to see how persistent sessions are established and reused, and compare the handling of this case with other network-related exceptions to keep the behavior consistent across the codebase.
Once I understand the flow, I'll update the relevant error handling so that failures caused specifically by an expired persistent connection result in a clearer and more actionable exception, without affecting the handling of other request failures.
Finally, I'll add or update tests to simulate this scenario, verify the expected exception and error message, run the relevant test suite to ensure there are no regressions, and submit a PR with the changes and any implementation notes if needed.
@HeetRanpura You have been unassigned from this issue because you have not made any updates for over 14 days. Please feel free to reclaim the issue if you decide to pick up again. Thanks!
Welcome to Zulip, @nitikagotra75-crypto! By picking up a Zulip issue, you're promising to do your best to follow Zulip's contributing guidelines. Neglecting to do so wastes maintainer time, and may result in being banned from contributing to Zulip.
To get started:
Work through all the "Prior to picking up your first issue" sections of the Zulip contributor guide.
Post a comment here describing your plan for how to approach this issue. Before you claim an issue, you should be confident that you will be able to tackle it effectively.
The issue will be assigned to you when all three steps have been completed. If you get stuck, you can always @zulipbot abandon this issue, and pick a different one.
If someone else claims this issue while you're working through the checklist, no worries! You can contribute by providing feedback on their pull request. If you’ve made good progress in understanding part of the codebase, you can also find another “help wanted” issue in the same area to work on.
Activity
Beanpen commentedon Nov 10, 2022
@zulipbot claim
zulipbot commentedon Nov 10, 2022
Welcome to Zulip, @Beanpen! We just sent you an invite to collaborate on this repository at https://github.com/zulip/python-zulip-api/invitations. Please accept this invite in order to claim this issue and begin a fun, rewarding experience contributing to Zulip!
Here's some tips to get you off to a good start:
As you work on this issue, you'll also want to refer to the Zulip code contribution guide, as well as the rest of the developer documentation on that site.
See you on the other side (that is, the pull request side)!
Beanpen commentedon Nov 11, 2022
Hi @timabbott I wonder if you mean to remove all the alias of "client = zulip.Client(...)" and instead directly call "zulip.Client(...)" in all files. Thank you!
zulipbot commentedon Nov 21, 2022
@Beanpen You have been unassigned from this issue because you have not made any updates for over 14 days. Please feel free to reclaim the issue if you decide to pick up again. Thanks!
ryansong13 commentedon Dec 6, 2022
@zulipbot claim
zulipbot commentedon Dec 6, 2022
Welcome to Zulip, @ryansong13! We just sent you an invite to collaborate on this repository at https://github.com/zulip/python-zulip-api/invitations. Please accept this invite in order to claim this issue and begin a fun, rewarding experience contributing to Zulip!
Here's some tips to get you off to a good start:
As you work on this issue, you'll also want to refer to the Zulip code contribution guide, as well as the rest of the developer documentation on that site.
See you on the other side (that is, the pull request side)!
ryansong13 commentedon Dec 13, 2022
@zulipbot abandon
45 remaining items
zulipbot commentedon Jul 29, 2026
Welcome to Zulip, @HeetRanpura! By picking up a Zulip issue, you're promising to do your best to follow Zulip's contributing guidelines. Neglecting to do so wastes maintainer time, and may result in being banned from contributing to Zulip.
To get started:
The issue will be assigned to you when all three steps have been completed. If you get stuck, you can always
@zulipbot abandonthis issue, and pick a different one.If someone else claims this issue while you're working through the checklist, no worries! You can contribute by providing feedback on their pull request. If you’ve made good progress in understanding part of the codebase, you can also find another “help wanted” issue in the same area to work on.
HeetRanpura commentedon Jul 29, 2026
@zulipbot
Hi! Here's my plan for approaching this issue.
I'll start by reproducing the issue locally and identifying the request path where an expired persistent connection causes the failure. From there, I'll trace how the exception is propagated through the client to understand where the current error handling can be improved.
I'll also review the connection management and request logic to see how persistent sessions are established and reused, and compare the handling of this case with other network-related exceptions to keep the behavior consistent across the codebase.
Once I understand the flow, I'll update the relevant error handling so that failures caused specifically by an expired persistent connection result in a clearer and more actionable exception, without affecting the handling of other request failures.
Finally, I'll add or update tests to simulate this scenario, verify the expected exception and error message, run the relevant test suite to ensure there are no regressions, and submit a PR with the changes and any implementation notes if needed.
zulip: Reset session on ConnectionError to fix stale connections.
zulipbot commentedon Aug 8, 2026
@HeetRanpura You have been unassigned from this issue because you have not made any updates for over 14 days. Please feel free to reclaim the issue if you decide to pick up again. Thanks!
HeetRanpura commentedon Aug 8, 2026
@zulipbot Still active on this, PR #922 is up and ready for review.
advikdivekar commentedon Aug 11, 2026
@zulipbot abandon
zulipbot commentedon Aug 11, 2026
ERROR: You have not claimed this issue to work on yet.
nitikagotra75-crypto commentedon Oct 6, 2026
@zulipbot claim
zulipbot commentedon Oct 6, 2026
Welcome to Zulip, @nitikagotra75-crypto! By picking up a Zulip issue, you're promising to do your best to follow Zulip's contributing guidelines. Neglecting to do so wastes maintainer time, and may result in being banned from contributing to Zulip.
To get started:
The issue will be assigned to you when all three steps have been completed. If you get stuck, you can always
@zulipbot abandonthis issue, and pick a different one.If someone else claims this issue while you're working through the checklist, no worries! You can contribute by providing feedback on their pull request. If you’ve made good progress in understanding part of the codebase, you can also find another “help wanted” issue in the same area to work on.