mirror of
https://github.com/appwrite/console.git
synced 2026-11-18 20:47:21 +00:00
fix: error handling
This commit is contained in:
1 parent
7b56a3351e
commit
35aa7b55a2
7 files changed
+20
-7
No files matched your search
@@ -0,0 +1,12 @@
|
||||
<script>
|
||||
import { page } from '$app/stores';
|
||||
import { Heading } from '$lib/components';
|
||||
import { Button } from '$lib/elements/forms';
|
||||
import { Container } from '$lib/layout';
|
||||
</script>
|
||||
|
||||
<Container>
|
||||
<Heading size="1" tag="h3">{$page.status}</Heading>
|
||||
<Heading size="3" tag="h4">{$page.error.message}</Heading>
|
||||
<Button href="/console">Back to the console</Button>
|
||||
</Container>
|
||||
@@ -13,10 +13,11 @@ export const load: LayoutLoad = async ({ params, parent, depends }) => {
|
||||
return {
|
||||
header: Header,
|
||||
breadcrumbs: Breadcrumbs,
|
||||
organization: sdkForConsole.teams.get(params.organization),
|
||||
members: sdkForConsole.teams.listMemberships(params.organization)
|
||||
organization: await sdkForConsole.teams.get(params.organization),
|
||||
members: await sdkForConsole.teams.listMemberships(params.organization)
|
||||
};
|
||||
} catch (e) {
|
||||
globalThis.localStorage.removeItem('organization');
|
||||
throw error(e.code, e.message);
|
||||
}
|
||||
};
|
||||
@@ -14,7 +14,7 @@ export const load: PageLoad = async ({ params, parent, url }) => {
|
||||
offset,
|
||||
search,
|
||||
page,
|
||||
teams: sdkForProject.teams.list(
|
||||
teams: await sdkForProject.teams.list(
|
||||
[Query.limit(PAGE_LIMIT), Query.offset(offset), Query.orderDesc('$createdAt')],
|
||||
search
|
||||
)
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ export const load: PageLoad = async ({ params, parent }) => {
|
||||
|
||||
return {
|
||||
offset,
|
||||
logs: sdkForProject.teams.listLogs(params.team, [
|
||||
logs: await sdkForProject.teams.listLogs(params.team, [
|
||||
Query.limit(PAGE_LIMIT),
|
||||
Query.offset(offset)
|
||||
])
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ export const load: PageLoad = async ({ params, parent, depends, url }) => {
|
||||
return {
|
||||
offset,
|
||||
search,
|
||||
memberships: sdkForProject.teams.listMemberships(
|
||||
memberships: await sdkForProject.teams.listMemberships(
|
||||
teamId,
|
||||
[Query.limit(PAGE_LIMIT), Query.offset(offset), Query.orderDesc('$createdAt')],
|
||||
search
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ export const load: PageLoad = async ({ params, parent }) => {
|
||||
|
||||
return {
|
||||
offset,
|
||||
logs: sdkForProject.databases.listCollectionLogs(params.database, params.collection, [
|
||||
logs: await sdkForProject.databases.listCollectionLogs(params.database, params.collection, [
|
||||
Query.limit(PAGE_LIMIT),
|
||||
Query.offset(offset)
|
||||
])
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ export const load: PageLoad = async ({ params, parent }) => {
|
||||
|
||||
return {
|
||||
offset,
|
||||
logs: sdkForProject.databases.listDocumentLogs(
|
||||
logs: await sdkForProject.databases.listDocumentLogs(
|
||||
params.database,
|
||||
params.collection,
|
||||
params.document,
|
||||
|
||||
Reference in new issue
Block a user