prisma 6.7.0-dev.1 → 6.7.0-dev.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -832,6 +832,12 @@ declare type Document_2 = ReadonlyDeep_2<{
832
832
  mappings: Mappings;
833
833
  }>;
834
834
 
835
+ declare class DriverAdapterError extends Error {
836
+ name: string;
837
+ cause: Error_2;
838
+ constructor(payload: Error_2);
839
+ }
840
+
835
841
  /**
836
842
  * A generic driver adapter factory that allows the user to instantiate a
837
843
  * driver adapter. The query and result types are specific to the adapter.
@@ -1148,6 +1154,49 @@ declare type Error_2 = {
1148
1154
  } | {
1149
1155
  kind: 'InvalidIsolationLevel';
1150
1156
  level: string;
1157
+ } | {
1158
+ kind: 'LengthMismatch';
1159
+ column?: string;
1160
+ } | {
1161
+ kind: 'UniqueConstraintViolation';
1162
+ fields: string[];
1163
+ } | {
1164
+ kind: 'NullConstraintViolation';
1165
+ fields: string[];
1166
+ } | {
1167
+ kind: 'ForeignKeyConstraintViolation';
1168
+ constraint?: {
1169
+ fields: string[];
1170
+ } | {
1171
+ index: string;
1172
+ } | {
1173
+ foreignKey: {};
1174
+ };
1175
+ } | {
1176
+ kind: 'DatabaseDoesNotExist';
1177
+ db?: string;
1178
+ } | {
1179
+ kind: 'DatabaseAlreadyExists';
1180
+ db?: string;
1181
+ } | {
1182
+ kind: 'DatabaseAccessDenied';
1183
+ db?: string;
1184
+ } | {
1185
+ kind: 'AuthenticationFailed';
1186
+ user?: string;
1187
+ } | {
1188
+ kind: 'TransactionWriteConflict';
1189
+ } | {
1190
+ kind: 'TableDoesNotExist';
1191
+ table?: string;
1192
+ } | {
1193
+ kind: 'ColumnNotFound';
1194
+ column?: string;
1195
+ } | {
1196
+ kind: 'TooManyConnections';
1197
+ cause: string;
1198
+ } | {
1199
+ kind: 'SocketTimeout';
1151
1200
  } | {
1152
1201
  kind: 'postgres';
1153
1202
  code: string;
@@ -2841,6 +2890,7 @@ declare class RequestHandler {
2841
2890
  handleRequestError({ error, clientMethod, callsite, transaction, args, modelName, globalOmit, }: HandleErrorParams): never;
2842
2891
  sanitizeMessage(message: any): any;
2843
2892
  unpack(data: unknown, dataPath: string[], unpacker?: Unpacker): any;
2893
+ convertAdapterToUserFacingError(err: DriverAdapterError): PrismaClientKnownRequestError | undefined;
2844
2894
  get [Symbol.toStringTag](): string;
2845
2895
  }
2846
2896
 
@@ -832,6 +832,12 @@ declare type Document_2 = ReadonlyDeep_2<{
832
832
  mappings: Mappings;
833
833
  }>;
834
834
 
835
+ declare class DriverAdapterError extends Error {
836
+ name: string;
837
+ cause: Error_2;
838
+ constructor(payload: Error_2);
839
+ }
840
+
835
841
  /**
836
842
  * A generic driver adapter factory that allows the user to instantiate a
837
843
  * driver adapter. The query and result types are specific to the adapter.
@@ -1148,6 +1154,49 @@ declare type Error_2 = {
1148
1154
  } | {
1149
1155
  kind: 'InvalidIsolationLevel';
1150
1156
  level: string;
1157
+ } | {
1158
+ kind: 'LengthMismatch';
1159
+ column?: string;
1160
+ } | {
1161
+ kind: 'UniqueConstraintViolation';
1162
+ fields: string[];
1163
+ } | {
1164
+ kind: 'NullConstraintViolation';
1165
+ fields: string[];
1166
+ } | {
1167
+ kind: 'ForeignKeyConstraintViolation';
1168
+ constraint?: {
1169
+ fields: string[];
1170
+ } | {
1171
+ index: string;
1172
+ } | {
1173
+ foreignKey: {};
1174
+ };
1175
+ } | {
1176
+ kind: 'DatabaseDoesNotExist';
1177
+ db?: string;
1178
+ } | {
1179
+ kind: 'DatabaseAlreadyExists';
1180
+ db?: string;
1181
+ } | {
1182
+ kind: 'DatabaseAccessDenied';
1183
+ db?: string;
1184
+ } | {
1185
+ kind: 'AuthenticationFailed';
1186
+ user?: string;
1187
+ } | {
1188
+ kind: 'TransactionWriteConflict';
1189
+ } | {
1190
+ kind: 'TableDoesNotExist';
1191
+ table?: string;
1192
+ } | {
1193
+ kind: 'ColumnNotFound';
1194
+ column?: string;
1195
+ } | {
1196
+ kind: 'TooManyConnections';
1197
+ cause: string;
1198
+ } | {
1199
+ kind: 'SocketTimeout';
1151
1200
  } | {
1152
1201
  kind: 'postgres';
1153
1202
  code: string;
@@ -2841,6 +2890,7 @@ declare class RequestHandler {
2841
2890
  handleRequestError({ error, clientMethod, callsite, transaction, args, modelName, globalOmit, }: HandleErrorParams): never;
2842
2891
  sanitizeMessage(message: any): any;
2843
2892
  unpack(data: unknown, dataPath: string[], unpacker?: Unpacker): any;
2893
+ convertAdapterToUserFacingError(err: DriverAdapterError): PrismaClientKnownRequestError | undefined;
2844
2894
  get [Symbol.toStringTag](): string;
2845
2895
  }
2846
2896