@@ -81,7 +81,7 @@ const cancelWaitlist = action(async (workspaceID: string) => {
8181 . where ( eq ( BillingTable . workspaceID , workspaceID ) ) ,
8282 )
8383 return { error : undefined }
84- } , workspaceID ) . catch ( ( e ) => ( { error : e . message as string } ) ) ,
84+ } , workspaceID ) . catch ( ( e ) => ( { error : String ( e ? .message ?? e ) } ) ) ,
8585 { revalidate : [ queryBillingInfo . key , querySubscription . key ] } ,
8686 )
8787} , "cancelWaitlist" )
@@ -92,7 +92,7 @@ const enroll = action(async (workspaceID: string) => {
9292 await withActor ( async ( ) => {
9393 await Billing . subscribeBlack ( { seats : 1 } )
9494 return { error : undefined }
95- } , workspaceID ) . catch ( ( e ) => ( { error : e . message as string } ) ) ,
95+ } , workspaceID ) . catch ( ( e ) => ( { error : String ( e ? .message ?? e ) } ) ) ,
9696 { revalidate : [ queryBillingInfo . key , querySubscription . key ] } ,
9797 )
9898} , "enroll" )
@@ -105,7 +105,7 @@ const createSessionUrl = action(async (workspaceID: string, returnUrl: string) =
105105 Billing . generateSessionUrl ( { returnUrl } )
106106 . then ( ( data ) => ( { error : undefined , data } ) )
107107 . catch ( ( e ) => ( {
108- error : e . message as string ,
108+ error : String ( e ? .message ?? e ) ,
109109 data : undefined ,
110110 } ) ) ,
111111 workspaceID ,
@@ -133,7 +133,7 @@ const setUseBalance = action(async (form: FormData) => {
133133 . where ( eq ( BillingTable . workspaceID , workspaceID ) ) ,
134134 )
135135 return { error : undefined }
136- } , workspaceID ) . catch ( ( e ) => ( { error : e . message as string } ) ) ,
136+ } , workspaceID ) . catch ( ( e ) => ( { error : String ( e ? .message ?? e ) } ) ) ,
137137 { revalidate : [ queryBillingInfo . key , querySubscription . key ] } ,
138138 )
139139} , "setUseBalance" )
0 commit comments