Skip to content

Commit

Permalink
fix: handle 403 / 401 errors on sync
Browse files Browse the repository at this point in the history
Signed-off-by: Maud Royer <[email protected]>
  • Loading branch information
jillro committed Jun 24, 2024
1 parent 59b0a53 commit 3a3bf60
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/stores/storage.js
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,10 @@ export const useCartoBioStorage = defineStore('storage', () => {
await operatorStore.ready(recordId)
}
} catch (e) {
if (e.response?.status === 403 || e.response?.status === 401) {
continue
}

if (e.response?.status === 412 || e.response?.status === 404) {
if (!recordsStorage[recordId]) {
await addRecord(recordId)
Expand Down

0 comments on commit 3a3bf60

Please sign in to comment.