fix(tenants): cast Prisma unique error for TS narrowing
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -437,7 +437,7 @@ export class TenantsService {
|
|||||||
if (!(error instanceof Prisma.PrismaClientKnownRequestError)) {
|
if (!(error instanceof Prisma.PrismaClientKnownRequestError)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const prismaError = error;
|
const prismaError = error as Prisma.PrismaClientKnownRequestError;
|
||||||
if (prismaError.code !== 'P2002') {
|
if (prismaError.code !== 'P2002') {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user