mirror of
https://github.com/documenso/documenso.git
synced 2025-11-13 16:23:06 +10:00
fix: bump trpc and openapi packages (#1591)
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
import { prisma } from '@documenso/prisma';
|
||||
import { DocumentStatus } from '@documenso/prisma/client';
|
||||
|
||||
import { AppError, AppErrorCode } from '../../errors/app-error';
|
||||
import { deletedAccountServiceAccount } from './service-accounts/deleted-account';
|
||||
|
||||
export type DeleteUserOptions = {
|
||||
@ -15,7 +16,9 @@ export const deleteUser = async ({ id }: DeleteUserOptions) => {
|
||||
});
|
||||
|
||||
if (!user) {
|
||||
throw new Error(`User with ID ${id} not found`);
|
||||
throw new AppError(AppErrorCode.NOT_FOUND, {
|
||||
message: `User with ID ${id} not found`,
|
||||
});
|
||||
}
|
||||
|
||||
const serviceAccount = await deletedAccountServiceAccount();
|
||||
|
||||
Reference in New Issue
Block a user