Add 401 catch to firebaseProjects

This commit is contained in:
Bradley Schofield committed 2023-08-04 16:57:21 +01:00
1 parent 836a3b0529
commit 58f652f88d
1 file changed
+10 -2
@@ -2,8 +2,16 @@ import { Dependencies } from '$lib/constants.js';
import { sdk } from '$lib/stores/sdk';
async function getFirebaseProjects() {
const res = await sdk.forProject.migrations.listFirebaseProjects();
return res.projects;
try {
const res = await sdk.forProject.migrations.listFirebaseProjects();
return res.projects;
} catch (e) {
if (e.code === 401) {
return [];
} else {
throw e;
}
}
}
export async function load({ depends }) {