File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff 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' ,
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ import { logError, registerCustomSerializers } from '../utils';
1818registerCustomSerializers ( ) ;
1919
2020const 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} ;
You can’t perform that action at this time.
0 commit comments