@shizuoka-its/core 1.1.0 → 2.0.0-alpha.0
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.
- package/dist/application/exceptions/ApplicationExceptions.d.ts +12 -0
- package/dist/application/exceptions/ApplicationExceptions.js +31 -0
- package/dist/application/exceptions/index.d.ts +1 -0
- package/dist/application/exceptions/index.js +17 -0
- package/dist/application/index.d.ts +2 -0
- package/dist/application/index.js +18 -0
- package/dist/application/usecase/BaseUseCase.d.ts +8 -0
- package/dist/application/usecase/BaseUseCase.js +2 -0
- package/dist/application/usecase/ChangeDiscordNickName.d.ts +12 -0
- package/dist/application/usecase/ChangeDiscordNickName.js +23 -0
- package/dist/application/usecase/ConnectDiscordAccount.d.ts +13 -0
- package/dist/application/usecase/ConnectDiscordAccount.js +22 -0
- package/dist/application/usecase/GetMember.d.ts +11 -0
- package/dist/application/usecase/GetMember.js +12 -0
- package/dist/application/usecase/GetMemberByDiscordId.d.ts +11 -0
- package/dist/application/usecase/GetMemberByDiscordId.js +12 -0
- package/dist/application/usecase/GetMemberByEmail.d.ts +11 -0
- package/dist/application/usecase/GetMemberByEmail.js +12 -0
- package/dist/application/usecase/GetMemberList.d.ts +9 -0
- package/dist/application/usecase/GetMemberList.js +12 -0
- package/dist/application/usecase/RegisterMember.d.ts +17 -0
- package/dist/application/usecase/RegisterMember.js +35 -0
- package/dist/application/usecase/UpdateMember.d.ts +27 -0
- package/dist/application/usecase/UpdateMember.js +38 -0
- package/dist/application/usecase/index.d.ts +9 -0
- package/dist/application/usecase/index.js +25 -0
- package/dist/domain/exceptions/DomainExceptions.d.ts +21 -0
- package/dist/domain/exceptions/DomainExceptions.js +52 -0
- package/dist/domain/exceptions/index.d.ts +1 -0
- package/dist/domain/exceptions/index.js +17 -0
- package/dist/domain/index.d.ts +3 -0
- package/dist/domain/index.js +19 -0
- package/dist/domain/member/DiscordAccount.d.ts +8 -0
- package/dist/domain/member/DiscordAccount.js +15 -0
- package/dist/domain/member/Member.d.ts +23 -0
- package/dist/domain/member/Member.js +51 -0
- package/dist/domain/member/MemberRepository.d.ts +9 -0
- package/dist/domain/member/MemberRepository.js +2 -0
- package/dist/domain/member/index.d.ts +3 -0
- package/dist/domain/member/index.js +19 -0
- package/dist/domain/value-objects/Departments.d.ts +7 -0
- package/dist/domain/value-objects/Departments.js +22 -0
- package/dist/domain/value-objects/Email.d.ts +4 -0
- package/dist/domain/value-objects/Email.js +12 -0
- package/dist/domain/value-objects/UniversityEmail.d.ts +4 -0
- package/dist/domain/value-objects/UniversityEmail.js +13 -0
- package/dist/domain/value-objects/ValueObject.d.ts +8 -0
- package/dist/domain/value-objects/ValueObject.js +24 -0
- package/dist/domain/value-objects/index.d.ts +4 -0
- package/dist/domain/value-objects/index.js +20 -0
- package/dist/executable/index.d.ts +1 -0
- package/dist/{errors → executable}/index.js +1 -1
- package/dist/executable/member.d.ts +12 -0
- package/dist/executable/member.js +18 -0
- package/dist/index.d.ts +2 -3
- package/dist/index.js +2 -16
- package/dist/infrastructure/prisma/PrismaMemberRepository.d.ts +11 -0
- package/dist/infrastructure/prisma/PrismaMemberRepository.js +95 -0
- package/package.json +48 -45
- package/dist/errors/index.d.ts +0 -1
- package/dist/errors/prismaErrors.d.ts +0 -281
- package/dist/errors/prismaErrors.js +0 -749
|
@@ -1,749 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Prisma Client Known Request Errors
|
|
4
|
-
*
|
|
5
|
-
* This code is based on a workaround shared by @olalonde in the following GitHub Issue:
|
|
6
|
-
* https://github.com/prisma/prisma/issues/18871
|
|
7
|
-
*
|
|
8
|
-
* Many thanks to @olalonde for sharing this solution!
|
|
9
|
-
*/
|
|
10
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
-
exports.PrismaMigrationRollbackError = exports.PrismaMigrationDestructiveChangesError = exports.PrismaDatabaseCreationFailedError = exports.PrismaTransactionConflictError = exports.PrismaNumberOutOfRangeError = exports.PrismaMongoDBReplicaSetError = exports.PrismaFulltextIndexNotFoundError = exports.PrismaTransactionApiError = exports.PrismaDatabaseQueryExecutionErrors = exports.PrismaUnsupportedFeatureError = exports.PrismaOperationFailedError = exports.PrismaConnectionPoolTimeoutError = exports.PrismaInconsistentColumnDataError = exports.PrismaColumnDoesNotExistError = exports.PrismaTableDoesNotExistError = exports.PrismaValueOutOfRangeError = exports.PrismaInputError = exports.PrismaConnectedRecordsNotFoundError = exports.PrismaRecordsNotConnectedError = exports.PrismaQueryInterpretationError = exports.PrismaRelatedRecordNotFoundError = exports.PrismaRelationViolationError = exports.PrismaMissingRequiredArgumentError = exports.PrismaMissingRequiredValueError = exports.PrismaNullConstraintViolationError = exports.PrismaRawQueryFailedError = exports.PrismaQueryValidationError = exports.PrismaQueryParsingError = exports.PrismaDataValidationError = exports.PrismaInvalidValueError = exports.PrismaInvalidFieldValueError = exports.PrismaDatabaseConstraintError = exports.PrismaForeignKeyConstraintError = exports.PrismaUniqueConstraintError = exports.PrismaRecordDoesNotExistError = exports.PrismaValueTooLongError = exports.PrismaServerClosedConnectionError = exports.PrismaIncorrectParametersError = exports.PrismaUnsupportedDatabaseVersionError = exports.PrismaUnderlyingModelError = exports.PrismaInvalidDatabaseStringError = exports.PrismaSchemaValidationError = exports.PrismaTlsConnectionError = exports.PrismaUserAccessDeniedError = exports.PrismaDatabaseAlreadyExistsError = exports.PrismaOperationTimeoutError = exports.PrismaDatabaseDoesNotExistError = exports.PrismaDatabaseTimeoutError = exports.PrismaDatabaseUnreachableError = exports.PrismaAuthenticationFailedError = void 0;
|
|
12
|
-
exports.PrismaDataProxyInteractiveTransactionError = exports.PrismaDataProxyUnknownEngineStartupError = exports.PrismaDataProxyEngineStartupError = exports.PrismaDataProxyUnsupportedEngineVersionError = exports.PrismaDataProxyInvalidRequestParametersError = exports.PrismaDataProxyFetchError = exports.PrismaDataProxyRequestTimeoutError = exports.PrismaDataProxyUsageExceededError = exports.PrismaDataProxyUnauthorizedError = exports.PrismaDataProxyUnknownServerError = exports.PrismaDataProxySchemaUploadError = exports.PrismaDataProxyFeatureNotImplementedError = exports.PrismaDataProxyResourceNotFoundError = exports.PrismaDataProxyInvalidDatasourceError = exports.PrismaDataProxyRetryRequestError = exports.PrismaDataProxyRequestError = exports.PrismaInconsistentIntrospectedSchemaError = exports.PrismaEmptyIntrospectedDatabaseError = exports.PrismaIntrospectionFailedError = exports.PrismaNoDirectDdlError = exports.PrismaNoForeignKeysError = exports.PrismaShadowDatabaseDisabledError = exports.PrismaProviderMismatchError = exports.PrismaMigrationFailedToApplyError = exports.PrismaMigrationNotFoundError = exports.PrismaDatabaseResetFallbackFailedError = exports.PrismaMigrationFileNotFoundError = exports.PrismaShadowDatabaseCreationError = exports.PrismaProviderArraysNotSupportedError = exports.PrismaMigrationNotInFailedStateError = exports.PrismaMigrationNotFoundForRollbackError = exports.PrismaMigrationNameTooLongError = exports.PrismaFailedMigrationsError = exports.PrismaMigrationAlreadyAppliedError = exports.PrismaPreviewFeaturesBlockedError = exports.PrismaFailedMigrationError = exports.PrismaNonEmptySchemaError = exports.PrismaSystemDatabaseAlterationError = exports.PrismaMigrationFormatChangedError = void 0;
|
|
13
|
-
exports.toTypedPrismaError = toTypedPrismaError;
|
|
14
|
-
const library_1 = require("@prisma/client/runtime/library");
|
|
15
|
-
class BaseError extends library_1.PrismaClientKnownRequestError {
|
|
16
|
-
constructor(error) {
|
|
17
|
-
super(error.message, {
|
|
18
|
-
code: error.code,
|
|
19
|
-
clientVersion: error.clientVersion,
|
|
20
|
-
meta: error.meta,
|
|
21
|
-
batchRequestIdx: error.batchRequestIdx,
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
class PrismaAuthenticationFailedError extends BaseError {
|
|
26
|
-
constructor() {
|
|
27
|
-
super(...arguments);
|
|
28
|
-
this.code = "P1000";
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
exports.PrismaAuthenticationFailedError = PrismaAuthenticationFailedError;
|
|
32
|
-
class PrismaDatabaseUnreachableError extends BaseError {
|
|
33
|
-
constructor() {
|
|
34
|
-
super(...arguments);
|
|
35
|
-
this.code = "P1001";
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
exports.PrismaDatabaseUnreachableError = PrismaDatabaseUnreachableError;
|
|
39
|
-
class PrismaDatabaseTimeoutError extends BaseError {
|
|
40
|
-
constructor() {
|
|
41
|
-
super(...arguments);
|
|
42
|
-
this.code = "P1002";
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
exports.PrismaDatabaseTimeoutError = PrismaDatabaseTimeoutError;
|
|
46
|
-
class PrismaDatabaseDoesNotExistError extends BaseError {
|
|
47
|
-
constructor() {
|
|
48
|
-
super(...arguments);
|
|
49
|
-
this.code = "P1003";
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
exports.PrismaDatabaseDoesNotExistError = PrismaDatabaseDoesNotExistError;
|
|
53
|
-
class PrismaOperationTimeoutError extends BaseError {
|
|
54
|
-
constructor() {
|
|
55
|
-
super(...arguments);
|
|
56
|
-
this.code = "P1008";
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
exports.PrismaOperationTimeoutError = PrismaOperationTimeoutError;
|
|
60
|
-
class PrismaDatabaseAlreadyExistsError extends BaseError {
|
|
61
|
-
constructor() {
|
|
62
|
-
super(...arguments);
|
|
63
|
-
this.code = "P1009";
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
exports.PrismaDatabaseAlreadyExistsError = PrismaDatabaseAlreadyExistsError;
|
|
67
|
-
class PrismaUserAccessDeniedError extends BaseError {
|
|
68
|
-
constructor() {
|
|
69
|
-
super(...arguments);
|
|
70
|
-
this.code = "P1010";
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
exports.PrismaUserAccessDeniedError = PrismaUserAccessDeniedError;
|
|
74
|
-
class PrismaTlsConnectionError extends BaseError {
|
|
75
|
-
constructor() {
|
|
76
|
-
super(...arguments);
|
|
77
|
-
this.code = "P1011";
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
exports.PrismaTlsConnectionError = PrismaTlsConnectionError;
|
|
81
|
-
class PrismaSchemaValidationError extends BaseError {
|
|
82
|
-
constructor() {
|
|
83
|
-
super(...arguments);
|
|
84
|
-
this.code = "P1012";
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
exports.PrismaSchemaValidationError = PrismaSchemaValidationError;
|
|
88
|
-
class PrismaInvalidDatabaseStringError extends BaseError {
|
|
89
|
-
constructor() {
|
|
90
|
-
super(...arguments);
|
|
91
|
-
this.code = "P1013";
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
exports.PrismaInvalidDatabaseStringError = PrismaInvalidDatabaseStringError;
|
|
95
|
-
class PrismaUnderlyingModelError extends BaseError {
|
|
96
|
-
constructor() {
|
|
97
|
-
super(...arguments);
|
|
98
|
-
this.code = "P1014";
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
exports.PrismaUnderlyingModelError = PrismaUnderlyingModelError;
|
|
102
|
-
class PrismaUnsupportedDatabaseVersionError extends BaseError {
|
|
103
|
-
constructor() {
|
|
104
|
-
super(...arguments);
|
|
105
|
-
this.code = "P1015";
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
exports.PrismaUnsupportedDatabaseVersionError = PrismaUnsupportedDatabaseVersionError;
|
|
109
|
-
class PrismaIncorrectParametersError extends BaseError {
|
|
110
|
-
constructor() {
|
|
111
|
-
super(...arguments);
|
|
112
|
-
this.code = "P1016";
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
exports.PrismaIncorrectParametersError = PrismaIncorrectParametersError;
|
|
116
|
-
class PrismaServerClosedConnectionError extends BaseError {
|
|
117
|
-
constructor() {
|
|
118
|
-
super(...arguments);
|
|
119
|
-
this.code = "P1017";
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
exports.PrismaServerClosedConnectionError = PrismaServerClosedConnectionError;
|
|
123
|
-
class PrismaValueTooLongError extends BaseError {
|
|
124
|
-
constructor() {
|
|
125
|
-
super(...arguments);
|
|
126
|
-
this.code = "P2000";
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
exports.PrismaValueTooLongError = PrismaValueTooLongError;
|
|
130
|
-
class PrismaRecordDoesNotExistError extends BaseError {
|
|
131
|
-
constructor() {
|
|
132
|
-
super(...arguments);
|
|
133
|
-
this.code = "P2001";
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
exports.PrismaRecordDoesNotExistError = PrismaRecordDoesNotExistError;
|
|
137
|
-
class PrismaUniqueConstraintError extends BaseError {
|
|
138
|
-
constructor() {
|
|
139
|
-
super(...arguments);
|
|
140
|
-
this.code = "P2002";
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
exports.PrismaUniqueConstraintError = PrismaUniqueConstraintError;
|
|
144
|
-
class PrismaForeignKeyConstraintError extends BaseError {
|
|
145
|
-
constructor() {
|
|
146
|
-
super(...arguments);
|
|
147
|
-
this.code = "P2003";
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
exports.PrismaForeignKeyConstraintError = PrismaForeignKeyConstraintError;
|
|
151
|
-
class PrismaDatabaseConstraintError extends BaseError {
|
|
152
|
-
constructor() {
|
|
153
|
-
super(...arguments);
|
|
154
|
-
this.code = "P2004";
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
exports.PrismaDatabaseConstraintError = PrismaDatabaseConstraintError;
|
|
158
|
-
class PrismaInvalidFieldValueError extends BaseError {
|
|
159
|
-
constructor() {
|
|
160
|
-
super(...arguments);
|
|
161
|
-
this.code = "P2005";
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
exports.PrismaInvalidFieldValueError = PrismaInvalidFieldValueError;
|
|
165
|
-
class PrismaInvalidValueError extends BaseError {
|
|
166
|
-
constructor() {
|
|
167
|
-
super(...arguments);
|
|
168
|
-
this.code = "P2006";
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
exports.PrismaInvalidValueError = PrismaInvalidValueError;
|
|
172
|
-
class PrismaDataValidationError extends BaseError {
|
|
173
|
-
constructor() {
|
|
174
|
-
super(...arguments);
|
|
175
|
-
this.code = "P2007";
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
exports.PrismaDataValidationError = PrismaDataValidationError;
|
|
179
|
-
class PrismaQueryParsingError extends BaseError {
|
|
180
|
-
constructor() {
|
|
181
|
-
super(...arguments);
|
|
182
|
-
this.code = "P2008";
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
exports.PrismaQueryParsingError = PrismaQueryParsingError;
|
|
186
|
-
class PrismaQueryValidationError extends BaseError {
|
|
187
|
-
constructor() {
|
|
188
|
-
super(...arguments);
|
|
189
|
-
this.code = "P2009";
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
exports.PrismaQueryValidationError = PrismaQueryValidationError;
|
|
193
|
-
class PrismaRawQueryFailedError extends BaseError {
|
|
194
|
-
constructor() {
|
|
195
|
-
super(...arguments);
|
|
196
|
-
this.code = "P2010";
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
exports.PrismaRawQueryFailedError = PrismaRawQueryFailedError;
|
|
200
|
-
class PrismaNullConstraintViolationError extends BaseError {
|
|
201
|
-
constructor() {
|
|
202
|
-
super(...arguments);
|
|
203
|
-
this.code = "P2011";
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
exports.PrismaNullConstraintViolationError = PrismaNullConstraintViolationError;
|
|
207
|
-
class PrismaMissingRequiredValueError extends BaseError {
|
|
208
|
-
constructor() {
|
|
209
|
-
super(...arguments);
|
|
210
|
-
this.code = "P2012";
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
exports.PrismaMissingRequiredValueError = PrismaMissingRequiredValueError;
|
|
214
|
-
class PrismaMissingRequiredArgumentError extends BaseError {
|
|
215
|
-
constructor() {
|
|
216
|
-
super(...arguments);
|
|
217
|
-
this.code = "P2013";
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
exports.PrismaMissingRequiredArgumentError = PrismaMissingRequiredArgumentError;
|
|
221
|
-
class PrismaRelationViolationError extends BaseError {
|
|
222
|
-
constructor() {
|
|
223
|
-
super(...arguments);
|
|
224
|
-
this.code = "P2014";
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
exports.PrismaRelationViolationError = PrismaRelationViolationError;
|
|
228
|
-
class PrismaRelatedRecordNotFoundError extends BaseError {
|
|
229
|
-
constructor() {
|
|
230
|
-
super(...arguments);
|
|
231
|
-
this.code = "P2015";
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
exports.PrismaRelatedRecordNotFoundError = PrismaRelatedRecordNotFoundError;
|
|
235
|
-
class PrismaQueryInterpretationError extends BaseError {
|
|
236
|
-
constructor() {
|
|
237
|
-
super(...arguments);
|
|
238
|
-
this.code = "P2016";
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
exports.PrismaQueryInterpretationError = PrismaQueryInterpretationError;
|
|
242
|
-
class PrismaRecordsNotConnectedError extends BaseError {
|
|
243
|
-
constructor() {
|
|
244
|
-
super(...arguments);
|
|
245
|
-
this.code = "P2017";
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
exports.PrismaRecordsNotConnectedError = PrismaRecordsNotConnectedError;
|
|
249
|
-
class PrismaConnectedRecordsNotFoundError extends BaseError {
|
|
250
|
-
constructor() {
|
|
251
|
-
super(...arguments);
|
|
252
|
-
this.code = "P2018";
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
exports.PrismaConnectedRecordsNotFoundError = PrismaConnectedRecordsNotFoundError;
|
|
256
|
-
class PrismaInputError extends BaseError {
|
|
257
|
-
constructor() {
|
|
258
|
-
super(...arguments);
|
|
259
|
-
this.code = "P2019";
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
exports.PrismaInputError = PrismaInputError;
|
|
263
|
-
class PrismaValueOutOfRangeError extends BaseError {
|
|
264
|
-
constructor() {
|
|
265
|
-
super(...arguments);
|
|
266
|
-
this.code = "P2020";
|
|
267
|
-
}
|
|
268
|
-
}
|
|
269
|
-
exports.PrismaValueOutOfRangeError = PrismaValueOutOfRangeError;
|
|
270
|
-
class PrismaTableDoesNotExistError extends BaseError {
|
|
271
|
-
constructor() {
|
|
272
|
-
super(...arguments);
|
|
273
|
-
this.code = "P2021";
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
exports.PrismaTableDoesNotExistError = PrismaTableDoesNotExistError;
|
|
277
|
-
class PrismaColumnDoesNotExistError extends BaseError {
|
|
278
|
-
constructor() {
|
|
279
|
-
super(...arguments);
|
|
280
|
-
this.code = "P2022";
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
exports.PrismaColumnDoesNotExistError = PrismaColumnDoesNotExistError;
|
|
284
|
-
class PrismaInconsistentColumnDataError extends BaseError {
|
|
285
|
-
constructor() {
|
|
286
|
-
super(...arguments);
|
|
287
|
-
this.code = "P2023";
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
exports.PrismaInconsistentColumnDataError = PrismaInconsistentColumnDataError;
|
|
291
|
-
class PrismaConnectionPoolTimeoutError extends BaseError {
|
|
292
|
-
constructor() {
|
|
293
|
-
super(...arguments);
|
|
294
|
-
this.code = "P2024";
|
|
295
|
-
}
|
|
296
|
-
}
|
|
297
|
-
exports.PrismaConnectionPoolTimeoutError = PrismaConnectionPoolTimeoutError;
|
|
298
|
-
class PrismaOperationFailedError extends BaseError {
|
|
299
|
-
constructor() {
|
|
300
|
-
super(...arguments);
|
|
301
|
-
this.code = "P2025";
|
|
302
|
-
}
|
|
303
|
-
}
|
|
304
|
-
exports.PrismaOperationFailedError = PrismaOperationFailedError;
|
|
305
|
-
class PrismaUnsupportedFeatureError extends BaseError {
|
|
306
|
-
constructor() {
|
|
307
|
-
super(...arguments);
|
|
308
|
-
this.code = "P2026";
|
|
309
|
-
}
|
|
310
|
-
}
|
|
311
|
-
exports.PrismaUnsupportedFeatureError = PrismaUnsupportedFeatureError;
|
|
312
|
-
class PrismaDatabaseQueryExecutionErrors extends BaseError {
|
|
313
|
-
constructor() {
|
|
314
|
-
super(...arguments);
|
|
315
|
-
this.code = "P2027";
|
|
316
|
-
}
|
|
317
|
-
}
|
|
318
|
-
exports.PrismaDatabaseQueryExecutionErrors = PrismaDatabaseQueryExecutionErrors;
|
|
319
|
-
class PrismaTransactionApiError extends BaseError {
|
|
320
|
-
constructor() {
|
|
321
|
-
super(...arguments);
|
|
322
|
-
this.code = "P2028";
|
|
323
|
-
}
|
|
324
|
-
}
|
|
325
|
-
exports.PrismaTransactionApiError = PrismaTransactionApiError;
|
|
326
|
-
class PrismaFulltextIndexNotFoundError extends BaseError {
|
|
327
|
-
constructor() {
|
|
328
|
-
super(...arguments);
|
|
329
|
-
this.code = "P2030";
|
|
330
|
-
}
|
|
331
|
-
}
|
|
332
|
-
exports.PrismaFulltextIndexNotFoundError = PrismaFulltextIndexNotFoundError;
|
|
333
|
-
class PrismaMongoDBReplicaSetError extends BaseError {
|
|
334
|
-
constructor() {
|
|
335
|
-
super(...arguments);
|
|
336
|
-
this.code = "P2031";
|
|
337
|
-
}
|
|
338
|
-
}
|
|
339
|
-
exports.PrismaMongoDBReplicaSetError = PrismaMongoDBReplicaSetError;
|
|
340
|
-
class PrismaNumberOutOfRangeError extends BaseError {
|
|
341
|
-
constructor() {
|
|
342
|
-
super(...arguments);
|
|
343
|
-
this.code = "P2033";
|
|
344
|
-
}
|
|
345
|
-
}
|
|
346
|
-
exports.PrismaNumberOutOfRangeError = PrismaNumberOutOfRangeError;
|
|
347
|
-
class PrismaTransactionConflictError extends BaseError {
|
|
348
|
-
constructor() {
|
|
349
|
-
super(...arguments);
|
|
350
|
-
this.code = "P2034";
|
|
351
|
-
}
|
|
352
|
-
}
|
|
353
|
-
exports.PrismaTransactionConflictError = PrismaTransactionConflictError;
|
|
354
|
-
class PrismaDatabaseCreationFailedError extends BaseError {
|
|
355
|
-
constructor() {
|
|
356
|
-
super(...arguments);
|
|
357
|
-
this.code = "P3000";
|
|
358
|
-
}
|
|
359
|
-
}
|
|
360
|
-
exports.PrismaDatabaseCreationFailedError = PrismaDatabaseCreationFailedError;
|
|
361
|
-
class PrismaMigrationDestructiveChangesError extends BaseError {
|
|
362
|
-
constructor() {
|
|
363
|
-
super(...arguments);
|
|
364
|
-
this.code = "P3001";
|
|
365
|
-
}
|
|
366
|
-
}
|
|
367
|
-
exports.PrismaMigrationDestructiveChangesError = PrismaMigrationDestructiveChangesError;
|
|
368
|
-
class PrismaMigrationRollbackError extends BaseError {
|
|
369
|
-
constructor() {
|
|
370
|
-
super(...arguments);
|
|
371
|
-
this.code = "P3002";
|
|
372
|
-
}
|
|
373
|
-
}
|
|
374
|
-
exports.PrismaMigrationRollbackError = PrismaMigrationRollbackError;
|
|
375
|
-
class PrismaMigrationFormatChangedError extends BaseError {
|
|
376
|
-
constructor() {
|
|
377
|
-
super(...arguments);
|
|
378
|
-
this.code = "P3003";
|
|
379
|
-
}
|
|
380
|
-
}
|
|
381
|
-
exports.PrismaMigrationFormatChangedError = PrismaMigrationFormatChangedError;
|
|
382
|
-
class PrismaSystemDatabaseAlterationError extends BaseError {
|
|
383
|
-
constructor() {
|
|
384
|
-
super(...arguments);
|
|
385
|
-
this.code = "P3004";
|
|
386
|
-
}
|
|
387
|
-
}
|
|
388
|
-
exports.PrismaSystemDatabaseAlterationError = PrismaSystemDatabaseAlterationError;
|
|
389
|
-
class PrismaNonEmptySchemaError extends BaseError {
|
|
390
|
-
constructor() {
|
|
391
|
-
super(...arguments);
|
|
392
|
-
this.code = "P3005";
|
|
393
|
-
}
|
|
394
|
-
}
|
|
395
|
-
exports.PrismaNonEmptySchemaError = PrismaNonEmptySchemaError;
|
|
396
|
-
class PrismaFailedMigrationError extends BaseError {
|
|
397
|
-
constructor() {
|
|
398
|
-
super(...arguments);
|
|
399
|
-
this.code = "P3006";
|
|
400
|
-
}
|
|
401
|
-
}
|
|
402
|
-
exports.PrismaFailedMigrationError = PrismaFailedMigrationError;
|
|
403
|
-
class PrismaPreviewFeaturesBlockedError extends BaseError {
|
|
404
|
-
constructor() {
|
|
405
|
-
super(...arguments);
|
|
406
|
-
this.code = "P3007";
|
|
407
|
-
}
|
|
408
|
-
}
|
|
409
|
-
exports.PrismaPreviewFeaturesBlockedError = PrismaPreviewFeaturesBlockedError;
|
|
410
|
-
class PrismaMigrationAlreadyAppliedError extends BaseError {
|
|
411
|
-
constructor() {
|
|
412
|
-
super(...arguments);
|
|
413
|
-
this.code = "P3008";
|
|
414
|
-
}
|
|
415
|
-
}
|
|
416
|
-
exports.PrismaMigrationAlreadyAppliedError = PrismaMigrationAlreadyAppliedError;
|
|
417
|
-
class PrismaFailedMigrationsError extends BaseError {
|
|
418
|
-
constructor() {
|
|
419
|
-
super(...arguments);
|
|
420
|
-
this.code = "P3009";
|
|
421
|
-
}
|
|
422
|
-
}
|
|
423
|
-
exports.PrismaFailedMigrationsError = PrismaFailedMigrationsError;
|
|
424
|
-
class PrismaMigrationNameTooLongError extends BaseError {
|
|
425
|
-
constructor() {
|
|
426
|
-
super(...arguments);
|
|
427
|
-
this.code = "P3010";
|
|
428
|
-
}
|
|
429
|
-
}
|
|
430
|
-
exports.PrismaMigrationNameTooLongError = PrismaMigrationNameTooLongError;
|
|
431
|
-
class PrismaMigrationNotFoundForRollbackError extends BaseError {
|
|
432
|
-
constructor() {
|
|
433
|
-
super(...arguments);
|
|
434
|
-
this.code = "P3011";
|
|
435
|
-
}
|
|
436
|
-
}
|
|
437
|
-
exports.PrismaMigrationNotFoundForRollbackError = PrismaMigrationNotFoundForRollbackError;
|
|
438
|
-
class PrismaMigrationNotInFailedStateError extends BaseError {
|
|
439
|
-
constructor() {
|
|
440
|
-
super(...arguments);
|
|
441
|
-
this.code = "P3012";
|
|
442
|
-
}
|
|
443
|
-
}
|
|
444
|
-
exports.PrismaMigrationNotInFailedStateError = PrismaMigrationNotInFailedStateError;
|
|
445
|
-
class PrismaProviderArraysNotSupportedError extends BaseError {
|
|
446
|
-
constructor() {
|
|
447
|
-
super(...arguments);
|
|
448
|
-
this.code = "P3013";
|
|
449
|
-
}
|
|
450
|
-
}
|
|
451
|
-
exports.PrismaProviderArraysNotSupportedError = PrismaProviderArraysNotSupportedError;
|
|
452
|
-
class PrismaShadowDatabaseCreationError extends BaseError {
|
|
453
|
-
constructor() {
|
|
454
|
-
super(...arguments);
|
|
455
|
-
this.code = "P3014";
|
|
456
|
-
}
|
|
457
|
-
}
|
|
458
|
-
exports.PrismaShadowDatabaseCreationError = PrismaShadowDatabaseCreationError;
|
|
459
|
-
class PrismaMigrationFileNotFoundError extends BaseError {
|
|
460
|
-
constructor() {
|
|
461
|
-
super(...arguments);
|
|
462
|
-
this.code = "P3015";
|
|
463
|
-
}
|
|
464
|
-
}
|
|
465
|
-
exports.PrismaMigrationFileNotFoundError = PrismaMigrationFileNotFoundError;
|
|
466
|
-
class PrismaDatabaseResetFallbackFailedError extends BaseError {
|
|
467
|
-
constructor() {
|
|
468
|
-
super(...arguments);
|
|
469
|
-
this.code = "P3016";
|
|
470
|
-
}
|
|
471
|
-
}
|
|
472
|
-
exports.PrismaDatabaseResetFallbackFailedError = PrismaDatabaseResetFallbackFailedError;
|
|
473
|
-
class PrismaMigrationNotFoundError extends BaseError {
|
|
474
|
-
constructor() {
|
|
475
|
-
super(...arguments);
|
|
476
|
-
this.code = "P3017";
|
|
477
|
-
}
|
|
478
|
-
}
|
|
479
|
-
exports.PrismaMigrationNotFoundError = PrismaMigrationNotFoundError;
|
|
480
|
-
class PrismaMigrationFailedToApplyError extends BaseError {
|
|
481
|
-
constructor() {
|
|
482
|
-
super(...arguments);
|
|
483
|
-
this.code = "P3018";
|
|
484
|
-
}
|
|
485
|
-
}
|
|
486
|
-
exports.PrismaMigrationFailedToApplyError = PrismaMigrationFailedToApplyError;
|
|
487
|
-
class PrismaProviderMismatchError extends BaseError {
|
|
488
|
-
constructor() {
|
|
489
|
-
super(...arguments);
|
|
490
|
-
this.code = "P3019";
|
|
491
|
-
}
|
|
492
|
-
}
|
|
493
|
-
exports.PrismaProviderMismatchError = PrismaProviderMismatchError;
|
|
494
|
-
class PrismaShadowDatabaseDisabledError extends BaseError {
|
|
495
|
-
constructor() {
|
|
496
|
-
super(...arguments);
|
|
497
|
-
this.code = "P3020";
|
|
498
|
-
}
|
|
499
|
-
}
|
|
500
|
-
exports.PrismaShadowDatabaseDisabledError = PrismaShadowDatabaseDisabledError;
|
|
501
|
-
class PrismaNoForeignKeysError extends BaseError {
|
|
502
|
-
constructor() {
|
|
503
|
-
super(...arguments);
|
|
504
|
-
this.code = "P3021";
|
|
505
|
-
}
|
|
506
|
-
}
|
|
507
|
-
exports.PrismaNoForeignKeysError = PrismaNoForeignKeysError;
|
|
508
|
-
class PrismaNoDirectDdlError extends BaseError {
|
|
509
|
-
constructor() {
|
|
510
|
-
super(...arguments);
|
|
511
|
-
this.code = "P3022";
|
|
512
|
-
}
|
|
513
|
-
}
|
|
514
|
-
exports.PrismaNoDirectDdlError = PrismaNoDirectDdlError;
|
|
515
|
-
class PrismaIntrospectionFailedError extends BaseError {
|
|
516
|
-
constructor() {
|
|
517
|
-
super(...arguments);
|
|
518
|
-
this.code = "P4000";
|
|
519
|
-
}
|
|
520
|
-
}
|
|
521
|
-
exports.PrismaIntrospectionFailedError = PrismaIntrospectionFailedError;
|
|
522
|
-
class PrismaEmptyIntrospectedDatabaseError extends BaseError {
|
|
523
|
-
constructor() {
|
|
524
|
-
super(...arguments);
|
|
525
|
-
this.code = "P4001";
|
|
526
|
-
}
|
|
527
|
-
}
|
|
528
|
-
exports.PrismaEmptyIntrospectedDatabaseError = PrismaEmptyIntrospectedDatabaseError;
|
|
529
|
-
class PrismaInconsistentIntrospectedSchemaError extends BaseError {
|
|
530
|
-
constructor() {
|
|
531
|
-
super(...arguments);
|
|
532
|
-
this.code = "P4002";
|
|
533
|
-
}
|
|
534
|
-
}
|
|
535
|
-
exports.PrismaInconsistentIntrospectedSchemaError = PrismaInconsistentIntrospectedSchemaError;
|
|
536
|
-
class PrismaDataProxyRequestError extends BaseError {
|
|
537
|
-
constructor() {
|
|
538
|
-
super(...arguments);
|
|
539
|
-
this.code = "P5000";
|
|
540
|
-
}
|
|
541
|
-
}
|
|
542
|
-
exports.PrismaDataProxyRequestError = PrismaDataProxyRequestError;
|
|
543
|
-
class PrismaDataProxyRetryRequestError extends BaseError {
|
|
544
|
-
constructor() {
|
|
545
|
-
super(...arguments);
|
|
546
|
-
this.code = "P5001";
|
|
547
|
-
}
|
|
548
|
-
}
|
|
549
|
-
exports.PrismaDataProxyRetryRequestError = PrismaDataProxyRetryRequestError;
|
|
550
|
-
class PrismaDataProxyInvalidDatasourceError extends BaseError {
|
|
551
|
-
constructor() {
|
|
552
|
-
super(...arguments);
|
|
553
|
-
this.code = "P5002";
|
|
554
|
-
}
|
|
555
|
-
}
|
|
556
|
-
exports.PrismaDataProxyInvalidDatasourceError = PrismaDataProxyInvalidDatasourceError;
|
|
557
|
-
class PrismaDataProxyResourceNotFoundError extends BaseError {
|
|
558
|
-
constructor() {
|
|
559
|
-
super(...arguments);
|
|
560
|
-
this.code = "P5003";
|
|
561
|
-
}
|
|
562
|
-
}
|
|
563
|
-
exports.PrismaDataProxyResourceNotFoundError = PrismaDataProxyResourceNotFoundError;
|
|
564
|
-
class PrismaDataProxyFeatureNotImplementedError extends BaseError {
|
|
565
|
-
constructor() {
|
|
566
|
-
super(...arguments);
|
|
567
|
-
this.code = "P5004";
|
|
568
|
-
}
|
|
569
|
-
}
|
|
570
|
-
exports.PrismaDataProxyFeatureNotImplementedError = PrismaDataProxyFeatureNotImplementedError;
|
|
571
|
-
class PrismaDataProxySchemaUploadError extends BaseError {
|
|
572
|
-
constructor() {
|
|
573
|
-
super(...arguments);
|
|
574
|
-
this.code = "P5005";
|
|
575
|
-
}
|
|
576
|
-
}
|
|
577
|
-
exports.PrismaDataProxySchemaUploadError = PrismaDataProxySchemaUploadError;
|
|
578
|
-
class PrismaDataProxyUnknownServerError extends BaseError {
|
|
579
|
-
constructor() {
|
|
580
|
-
super(...arguments);
|
|
581
|
-
this.code = "P5006";
|
|
582
|
-
}
|
|
583
|
-
}
|
|
584
|
-
exports.PrismaDataProxyUnknownServerError = PrismaDataProxyUnknownServerError;
|
|
585
|
-
class PrismaDataProxyUnauthorizedError extends BaseError {
|
|
586
|
-
constructor() {
|
|
587
|
-
super(...arguments);
|
|
588
|
-
this.code = "P5007";
|
|
589
|
-
}
|
|
590
|
-
}
|
|
591
|
-
exports.PrismaDataProxyUnauthorizedError = PrismaDataProxyUnauthorizedError;
|
|
592
|
-
class PrismaDataProxyUsageExceededError extends BaseError {
|
|
593
|
-
constructor() {
|
|
594
|
-
super(...arguments);
|
|
595
|
-
this.code = "P5008";
|
|
596
|
-
}
|
|
597
|
-
}
|
|
598
|
-
exports.PrismaDataProxyUsageExceededError = PrismaDataProxyUsageExceededError;
|
|
599
|
-
class PrismaDataProxyRequestTimeoutError extends BaseError {
|
|
600
|
-
constructor() {
|
|
601
|
-
super(...arguments);
|
|
602
|
-
this.code = "P5009";
|
|
603
|
-
}
|
|
604
|
-
}
|
|
605
|
-
exports.PrismaDataProxyRequestTimeoutError = PrismaDataProxyRequestTimeoutError;
|
|
606
|
-
class PrismaDataProxyFetchError extends BaseError {
|
|
607
|
-
constructor() {
|
|
608
|
-
super(...arguments);
|
|
609
|
-
this.code = "P5010";
|
|
610
|
-
}
|
|
611
|
-
}
|
|
612
|
-
exports.PrismaDataProxyFetchError = PrismaDataProxyFetchError;
|
|
613
|
-
class PrismaDataProxyInvalidRequestParametersError extends BaseError {
|
|
614
|
-
constructor() {
|
|
615
|
-
super(...arguments);
|
|
616
|
-
this.code = "P5011";
|
|
617
|
-
}
|
|
618
|
-
}
|
|
619
|
-
exports.PrismaDataProxyInvalidRequestParametersError = PrismaDataProxyInvalidRequestParametersError;
|
|
620
|
-
class PrismaDataProxyUnsupportedEngineVersionError extends BaseError {
|
|
621
|
-
constructor() {
|
|
622
|
-
super(...arguments);
|
|
623
|
-
this.code = "P5012";
|
|
624
|
-
}
|
|
625
|
-
}
|
|
626
|
-
exports.PrismaDataProxyUnsupportedEngineVersionError = PrismaDataProxyUnsupportedEngineVersionError;
|
|
627
|
-
class PrismaDataProxyEngineStartupError extends BaseError {
|
|
628
|
-
constructor() {
|
|
629
|
-
super(...arguments);
|
|
630
|
-
this.code = "P5013";
|
|
631
|
-
}
|
|
632
|
-
}
|
|
633
|
-
exports.PrismaDataProxyEngineStartupError = PrismaDataProxyEngineStartupError;
|
|
634
|
-
class PrismaDataProxyUnknownEngineStartupError extends BaseError {
|
|
635
|
-
constructor() {
|
|
636
|
-
super(...arguments);
|
|
637
|
-
this.code = "P5014";
|
|
638
|
-
}
|
|
639
|
-
}
|
|
640
|
-
exports.PrismaDataProxyUnknownEngineStartupError = PrismaDataProxyUnknownEngineStartupError;
|
|
641
|
-
class PrismaDataProxyInteractiveTransactionError extends BaseError {
|
|
642
|
-
constructor() {
|
|
643
|
-
super(...arguments);
|
|
644
|
-
this.code = "P5015";
|
|
645
|
-
}
|
|
646
|
-
}
|
|
647
|
-
exports.PrismaDataProxyInteractiveTransactionError = PrismaDataProxyInteractiveTransactionError;
|
|
648
|
-
const errorCodeToClass = {
|
|
649
|
-
P1000: PrismaAuthenticationFailedError,
|
|
650
|
-
P1001: PrismaDatabaseUnreachableError,
|
|
651
|
-
P1002: PrismaDatabaseTimeoutError,
|
|
652
|
-
P1003: PrismaDatabaseDoesNotExistError,
|
|
653
|
-
P1008: PrismaOperationTimeoutError,
|
|
654
|
-
P1009: PrismaDatabaseAlreadyExistsError,
|
|
655
|
-
P1010: PrismaUserAccessDeniedError,
|
|
656
|
-
P1011: PrismaTlsConnectionError,
|
|
657
|
-
P1012: PrismaSchemaValidationError,
|
|
658
|
-
P1013: PrismaInvalidDatabaseStringError,
|
|
659
|
-
P1014: PrismaUnderlyingModelError,
|
|
660
|
-
P1015: PrismaUnsupportedDatabaseVersionError,
|
|
661
|
-
P1016: PrismaIncorrectParametersError,
|
|
662
|
-
P1017: PrismaServerClosedConnectionError,
|
|
663
|
-
P2000: PrismaValueTooLongError,
|
|
664
|
-
P2001: PrismaRecordDoesNotExistError,
|
|
665
|
-
P2002: PrismaUniqueConstraintError,
|
|
666
|
-
P2003: PrismaForeignKeyConstraintError,
|
|
667
|
-
P2004: PrismaDatabaseConstraintError,
|
|
668
|
-
P2005: PrismaInvalidFieldValueError,
|
|
669
|
-
P2006: PrismaInvalidValueError,
|
|
670
|
-
P2007: PrismaDataValidationError,
|
|
671
|
-
P2008: PrismaQueryParsingError,
|
|
672
|
-
P2009: PrismaQueryValidationError,
|
|
673
|
-
P2010: PrismaRawQueryFailedError,
|
|
674
|
-
P2011: PrismaNullConstraintViolationError,
|
|
675
|
-
P2012: PrismaMissingRequiredValueError,
|
|
676
|
-
P2013: PrismaMissingRequiredArgumentError,
|
|
677
|
-
P2014: PrismaRelationViolationError,
|
|
678
|
-
P2015: PrismaRelatedRecordNotFoundError,
|
|
679
|
-
P2016: PrismaQueryInterpretationError,
|
|
680
|
-
P2017: PrismaRecordsNotConnectedError,
|
|
681
|
-
P2018: PrismaConnectedRecordsNotFoundError,
|
|
682
|
-
P2019: PrismaInputError,
|
|
683
|
-
P2020: PrismaValueOutOfRangeError,
|
|
684
|
-
P2021: PrismaTableDoesNotExistError,
|
|
685
|
-
P2022: PrismaColumnDoesNotExistError,
|
|
686
|
-
P2023: PrismaInconsistentColumnDataError,
|
|
687
|
-
P2024: PrismaConnectionPoolTimeoutError,
|
|
688
|
-
P2025: PrismaOperationFailedError,
|
|
689
|
-
P2026: PrismaUnsupportedFeatureError,
|
|
690
|
-
P2027: PrismaDatabaseQueryExecutionErrors,
|
|
691
|
-
P2028: PrismaTransactionApiError,
|
|
692
|
-
P2030: PrismaFulltextIndexNotFoundError,
|
|
693
|
-
P2031: PrismaMongoDBReplicaSetError,
|
|
694
|
-
P2033: PrismaNumberOutOfRangeError,
|
|
695
|
-
P2034: PrismaTransactionConflictError,
|
|
696
|
-
P3000: PrismaDatabaseCreationFailedError,
|
|
697
|
-
P3001: PrismaMigrationDestructiveChangesError,
|
|
698
|
-
P3002: PrismaMigrationRollbackError,
|
|
699
|
-
P3003: PrismaMigrationFormatChangedError,
|
|
700
|
-
P3004: PrismaSystemDatabaseAlterationError,
|
|
701
|
-
P3005: PrismaNonEmptySchemaError,
|
|
702
|
-
P3006: PrismaFailedMigrationError,
|
|
703
|
-
P3007: PrismaPreviewFeaturesBlockedError,
|
|
704
|
-
P3008: PrismaMigrationAlreadyAppliedError,
|
|
705
|
-
P3009: PrismaFailedMigrationsError,
|
|
706
|
-
P3010: PrismaMigrationNameTooLongError,
|
|
707
|
-
P3011: PrismaMigrationNotFoundForRollbackError,
|
|
708
|
-
P3012: PrismaMigrationNotInFailedStateError,
|
|
709
|
-
P3013: PrismaProviderArraysNotSupportedError,
|
|
710
|
-
P3014: PrismaShadowDatabaseCreationError,
|
|
711
|
-
P3015: PrismaMigrationFileNotFoundError,
|
|
712
|
-
P3016: PrismaDatabaseResetFallbackFailedError,
|
|
713
|
-
P3017: PrismaMigrationNotFoundError,
|
|
714
|
-
P3018: PrismaMigrationFailedToApplyError,
|
|
715
|
-
P3019: PrismaProviderMismatchError,
|
|
716
|
-
P3020: PrismaShadowDatabaseDisabledError,
|
|
717
|
-
P3021: PrismaNoForeignKeysError,
|
|
718
|
-
P3022: PrismaNoDirectDdlError,
|
|
719
|
-
P4000: PrismaIntrospectionFailedError,
|
|
720
|
-
P4001: PrismaEmptyIntrospectedDatabaseError,
|
|
721
|
-
P4002: PrismaInconsistentIntrospectedSchemaError,
|
|
722
|
-
P5000: PrismaDataProxyRequestError,
|
|
723
|
-
P5001: PrismaDataProxyRetryRequestError,
|
|
724
|
-
P5002: PrismaDataProxyInvalidDatasourceError,
|
|
725
|
-
P5003: PrismaDataProxyResourceNotFoundError,
|
|
726
|
-
P5004: PrismaDataProxyFeatureNotImplementedError,
|
|
727
|
-
P5005: PrismaDataProxySchemaUploadError,
|
|
728
|
-
P5006: PrismaDataProxyUnknownServerError,
|
|
729
|
-
P5007: PrismaDataProxyUnauthorizedError,
|
|
730
|
-
P5008: PrismaDataProxyUsageExceededError,
|
|
731
|
-
P5009: PrismaDataProxyRequestTimeoutError,
|
|
732
|
-
P5010: PrismaDataProxyFetchError,
|
|
733
|
-
P5011: PrismaDataProxyInvalidRequestParametersError,
|
|
734
|
-
P5012: PrismaDataProxyUnsupportedEngineVersionError,
|
|
735
|
-
P5013: PrismaDataProxyEngineStartupError,
|
|
736
|
-
P5014: PrismaDataProxyUnknownEngineStartupError,
|
|
737
|
-
P5015: PrismaDataProxyInteractiveTransactionError,
|
|
738
|
-
};
|
|
739
|
-
function toTypedPrismaError(error) {
|
|
740
|
-
if (!(error instanceof library_1.PrismaClientKnownRequestError)) {
|
|
741
|
-
return null;
|
|
742
|
-
}
|
|
743
|
-
const code = error.code;
|
|
744
|
-
const ErrorClass = errorCodeToClass[code];
|
|
745
|
-
if (!ErrorClass) {
|
|
746
|
-
return null;
|
|
747
|
-
}
|
|
748
|
-
return new ErrorClass(error);
|
|
749
|
-
}
|