Skip to content

Commit b1bcfe9

Browse files
committed
chore: fix build
1 parent 5bfd695 commit b1bcfe9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/server/src/api/rest/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1589,7 +1589,7 @@ class RequestHandler extends APIHandlerBase {
15891589

15901590
private handlePrismaError(err: unknown) {
15911591
if (isPrismaClientKnownRequestError(err)) {
1592-
if (err.code === PrismaErrorCode.CONSTRAINED_FAILED) {
1592+
if (err.code === PrismaErrorCode.CONSTRAINT_FAILED) {
15931593
if (err.meta?.reason === CrudFailureReason.DATA_VALIDATION_VIOLATION) {
15941594
return this.makeError(
15951595
'validationError',

packages/server/src/api/rpc/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import { logError, registerCustomSerializers } from '../utils';
1818
registerCustomSerializers();
1919

2020
const ERROR_STATUS_MAPPING: Record<string, number> = {
21-
[PrismaErrorCode.CONSTRAINED_FAILED]: 403,
21+
[PrismaErrorCode.CONSTRAINT_FAILED]: 403,
2222
[PrismaErrorCode.REQUIRED_CONNECTED_RECORD_NOT_FOUND]: 404,
2323
[PrismaErrorCode.DEPEND_ON_RECORD_NOT_FOUND]: 404,
2424
};

0 commit comments

Comments
 (0)