mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-20 09:06:45 +00:00
fix(GODT-2822): event loop behaviour on 429.
This commit is contained in:
@ -778,7 +778,7 @@ func (user *User) doEventPoll(ctx context.Context) error {
|
||||
}
|
||||
|
||||
// If the error is a server-side issue, return error to retry later.
|
||||
if apiErr := new(proton.APIError); errors.As(err, &apiErr) && apiErr.Status >= 500 {
|
||||
if is429Or5XXError(err) {
|
||||
return fmt.Errorf("failed to handle event due to server error: %w", err)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user