We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 75a0781 commit 413ad7dCopy full SHA for 413ad7d
1 file changed
packages/common/src/client/sync/stream/AbstractRemote.ts
@@ -396,9 +396,17 @@ export abstract class AbstractRemote {
396
syncQueueRequestSize, // The initial N amount
397
{
398
onError: (e) => {
399
- if (e.message.includes('Authorization failed') || e.message.includes('PSYNC_S21')) {
400
- this.invalidateCredentials();
+ if (e.message.includes('PSYNC_')) {
+ if (e.message.includes('PSYNC_S21')) {
401
+ this.invalidateCredentials();
402
+ }
403
+ } else {
404
+ // Possible that connection is with an older service, always invalidate to be safe
405
+ if (e.message !== 'Closed. ') {
406
407
408
}
409
+
410
// Don't log closed as an error
411
if (e.message !== 'Closed. ') {
412
this.logger.error(e);
0 commit comments