Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 01e02cf

Browse files
feat(app-server): ignore Stripe errors on account deletion
1 parent 37097ca commit 01e02cf

File tree

1 file changed

+6
-1
lines changed
  • apps/app-server/src/trpc/api/users/account

1 file changed

+6
-1
lines changed

‎apps/app-server/src/trpc/api/users/account/delete.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {
88
UserModel,
99
UserPageModel,
1010
} from '@deeplib/db';
11+
import { mainLogger } from '@stdlib/misc';
1112
import { checkRedlockSignalAborted } from '@stdlib/redlock';
1213
import { TRPCError } from '@trpc/server';
1314
import { once } from 'lodash';
@@ -213,7 +214,11 @@ export async function delete_({
213214
// Delete Stripe customer
214215

215216
if (user?.customer_id != null) {
216-
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+
}
217222
}
218223

219224
// Clear cookies

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /