Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Fix handling of wrong pin

Neeraj Guptaf39e095168ca
diff --git a/packages/shared/network/cast.ts b/packages/shared/network/cast.ts
index 41f1673357..6e94a5018c 100644
--- a/packages/shared/network/cast.ts
+++ b/packages/shared/network/cast.ts
@@ -1,3 +1,4 @@
+import { ApiError } from '../error';
import { logError } from '../sentry';
import { getToken } from '../storage/localStorage/helpers';
import HTTPService from './HTTPService';
@@ -31,6 +32,9 @@ class CastGateway {
}
);
} catch (e) {
+ if (e instanceof ApiError && e.httpStatusCode === 404) {
+ return '';
+ }
logError(e, 'failed to getPublicKey');
throw e;
}