diff --git a/src/routes/(console)/+error.svelte b/src/routes/(console)/+error.svelte index 41863e61a4..a4b8533bd1 100644 --- a/src/routes/(console)/+error.svelte +++ b/src/routes/(console)/+error.svelte @@ -5,7 +5,12 @@ import { Button } from '$lib/elements/forms'; import { isVerifyEmailRedirectError } from '$lib/helpers/emailVerification'; import { Container } from '$lib/layout'; - import { Typography } from '@appwrite.io/pink-svelte'; + import { Badge, Layout, Typography } from '@appwrite.io/pink-svelte'; + + const isPaymentError = $derived(page.status === 402); + const billingUrl = $derived( + page.params.organization ? `${base}/organization-${page.params.organization}/billing` : null + ); $effect(() => { const verifyEmailPath = resolve('/verify-email'); @@ -15,15 +20,56 @@ }); - -
- {'status' in page.error - ? page.error.status || 'Invalid Argument' - : 'Invalid Argument'} - {page.error.message} -
-
- -
-
+{#if isPaymentError} +
+
+ + + + + Your organization has reached a billing limit + + {page.error.message} + +
+ + {#if billingUrl} + + {/if} + + +
+
+
+
+{:else} + +
+ {'status' in page.error + ? page.error.status || 'Invalid Argument' + : 'Invalid Argument'} + {page.error.message} +
+
+ +
+
+{/if} + + diff --git a/src/routes/(console)/project-[region]-[project]/+error.svelte b/src/routes/(console)/project-[region]-[project]/+error.svelte index 602d883377..fd42e37f5b 100644 --- a/src/routes/(console)/project-[region]-[project]/+error.svelte +++ b/src/routes/(console)/project-[region]-[project]/+error.svelte @@ -1,12 +1,12 @@ -{#if page.error.type === 'general_resource_blocked'} +{#if isPaymentError} +
+
+ + + + + Your organization has reached a billing limit + + {page.error.message} + +
+ + {#if billingUrl} + + {/if} + + +
+
+
+
+{:else if page.error.type === 'general_resource_blocked'}