We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 37097ca commit 01e02cfCopy full SHA for 01e02cf
apps/app-server/src/trpc/api/users/account/delete.ts
@@ -8,6 +8,7 @@ import {
8
UserModel,
9
UserPageModel,
10
} from '@deeplib/db';
11
+import { mainLogger } from '@stdlib/misc';
12
import { checkRedlockSignalAborted } from '@stdlib/redlock';
13
import { TRPCError } from '@trpc/server';
14
import { once } from 'lodash';
@@ -213,7 +214,11 @@ export async function delete_({
213
214
// Delete Stripe customer
215
216
if (user?.customer_id != null) {
- await ctx.stripe.customers.del(user.customer_id);
217
+ try {
218
+ await ctx.stripe.customers.del(user.customer_id);
219
+ } catch (error) {
220
+ mainLogger.error(error);
221
+ }
222
}
223
224
// Clear cookies
0 commit comments