Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 28 additions & 7 deletions content/400-reference/200-api-reference/250-error-reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -90,19 +90,19 @@ Prisma Client throws a `PrismaClientValidationError` exception if validation fai

#### <inlinecode>P1002</inlinecode>

"The database server at `{database_host}`:`{database_port}` was reached but timed out. Please try again. Please make sure your database server is running at `{database_host}`:`{database_port}`. "
"The database server at `{database_host}`:`{database_port}` was reached but timed out. Please try again. Please make sure your database server is running at `{database_host}`:`{database_port}`. Context: `{context}` "

#### <inlinecode>P1003</inlinecode>

"Database {database_file_name} does not exist at {database_file_path}"
"Database `{database_file_name}` does not exist at {database_file_path}"

"Database `{database_name}.{database_schema_name}` does not exist on the database server at `{database_host}:{database_port}`."

"Database `{database_name}` does not exist on the database server at `{database_host}:{database_port}`."

#### <inlinecode>P1008</inlinecode>

"Operations timed out after `{time}`"
"Operations timed out after `{time}`. Context: {context}"

#### <inlinecode>P1009</inlinecode>

Expand Down Expand Up @@ -149,9 +149,6 @@ Possible errors:
- "Type `{}` is neither a built-in type, nor refers to another model, custom type, or enum."
- "Type `{}` is not a built-in type."
- "Unexpected token. Expected one of: {}"
- "{}"
- "{}"
- "{}"
- "Environment variable not found: {}."
- "Expected a {} value, but received {} value `{}`."
- "Expected a {} value, but failed while parsing `{}`: {}."
Expand Down Expand Up @@ -181,6 +178,14 @@ Possible errors:

"Server has closed the connection."

#### <inlinecode>P1018</inlinecode>

"{message}"

#### <inlinecode>P1019</inlinecode>

"{message}"
Comment on lines +181 to +187
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Script might not be capable of getting actual message here, or it is so variable as P1012 that it would make sense to get the actual, additional error codes either manually or adapting the script.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure where to get the errors from. Looking at the script, for P1012 it gets the list of messages from here (the updated path for the url5 link that returns a 404). But it's not obvious to me why these were used for P1012, or where I'd get the corresponding list for P1018 and P1019.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The engine code is not necessarily written to make it easy to parse this way, so Martina (who built this script) probably just asked and then added a special case for that file where it made sense - possibly the file that @garrensmith linked to might be the correct one to use here (or manually of course).

Side note: Adding to the file which section was auto generated and which one edited manually might be useful for the future.


### Prisma Client (Query Engine)

#### <inlinecode>P2000</inlinecode>
Expand Down Expand Up @@ -295,10 +300,26 @@ Possible errors:

"Multiple errors occurred on the database during query execution: {errors}"

#### <inlinecode>P2028</inlinecode>

"Transaction API error: {error}"

#### <inlinecode>P2029</inlinecode>

"Query parameter limit exceeded error: {message}."

#### <inlinecode>P2030</inlinecode>

"Cannot find a fulltext index to use for the search, try adding a @@fulltext([Fields...]) to your schema"

#### <inlinecode>P2031</inlinecode>

"Prisma needs to perform transactions, which requires your MongoDB server to be run as a replica set. https://pris.ly/d/mongodb-replica-set"

#### <inlinecode>P2032</inlinecode>

"Error converting field "{field}" of expected non-nullable type "{expected_type}" found incompatible value of "{found}"."

### Prisma Migrate (Migration Engine)

#### <inlinecode>P3000</inlinecode>
Expand Down Expand Up @@ -375,7 +396,7 @@ Possible errors:

#### <inlinecode>P3018</inlinecode>

"A migration failed to apply. New migrations can not be applied before the error is recovered from. Read more about how to resolve migration issues in a production database: https://pris.ly/d/migrate-resolve<br /><br />Migration name: {migration_name}<br /><br />Database error code: {database_error_code}<br /><br />Database error:<br />{database_error} "
"A migration failed to apply. New migrations cannot be applied before the error is recovered from. Read more about how to resolve migration issues in a production database: https://pris.ly/d/migrate-resolve<br /><br />Migration name: {migration_name}<br /><br />Database error code: {database_error_code}<br /><br />Database error:<br />{database_error} "

#### <inlinecode>P3019</inlinecode>

Expand Down