File tree Expand file tree Collapse file tree 1 file changed +15
-7
lines changed
src/routes/(console)/organization-[organization]/billing Expand file tree Collapse file tree 1 file changed +15
-7
lines changed Original file line number Diff line number Diff line change 2828 IconExternalLink ,
2929 IconRefresh
3030 } from ' @appwrite.io/pink-icons-svelte' ;
31+ import { addNotification } from ' $lib/stores/notifications' ;
3132
3233 let limit = $state (5 );
3334 let offset = $state (0 );
4445
4546 async function loadInvoices() {
4647 isLoadingInvoices = true ;
47- invoiceList = await sdk .forConsole .billing .listInvoices (page .params .organization , [
48- Query .orderDesc (' $createdAt' ),
49- Query .limit (limit ),
50- Query .offset (offset )
51- ]);
52-
53- isLoadingInvoices = false ;
48+ try {
49+ invoiceList = await sdk .forConsole .billing .listInvoices (page .params .organization , [
50+ Query .orderDesc (' $createdAt' ),
51+ Query .limit (limit ),
52+ Query .offset (offset )
53+ ]);
54+ } catch (error ) {
55+ addNotification ({
56+ type: ' error' ,
57+ message: error .message
58+ });
59+ } finally {
60+ isLoadingInvoices = false ;
61+ }
5462 }
5563
5664 function retryPayment(invoice : Invoice ) {
You can’t perform that action at this time.
0 commit comments