From fa9d75df9a010a714b1e40239e82f0c4dd3bac2d Mon Sep 17 00:00:00 2001 From: Lucy Keer Date: Thu, 3 Mar 2022 11:45:28 +0100 Subject: [PATCH 1/2] Update 250-error-reference.mdx Update with latest output from error_code_parser.py script --- .../200-api-reference/250-error-reference.mdx | 89 +++++++------------ 1 file changed, 34 insertions(+), 55 deletions(-) diff --git a/content/400-reference/200-api-reference/250-error-reference.mdx b/content/400-reference/200-api-reference/250-error-reference.mdx index f20a013e1d..bcdb8a4975 100644 --- a/content/400-reference/200-api-reference/250-error-reference.mdx +++ b/content/400-reference/200-api-reference/250-error-reference.mdx @@ -90,19 +90,13 @@ Prisma Client throws a `PrismaClientValidationError` exception if validation fai #### P1002 -"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} " #### P1003 -"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}`." - #### P1008 -"Operations timed out after `{time}`" +"Operations timed out after `{time}`. Context: {context}" #### P1009 @@ -122,45 +116,6 @@ Prisma Client throws a `PrismaClientValidationError` exception if validation fai Possible errors: -- "Argument `{}` is missing." -- "Function `{}` takes {} arguments, but received {}." -- "Argument `{}` is missing in attribute `@{}`." -- "Argument `{}` is missing in data source block `{}`." -- "Argument `{}` is missing in generator block `{}`." -- "Error parsing attribute `@{}`: {}" -- "Attribute `@{}` is defined twice." -- "The model with database name `{}` could not be defined because another model with this name exists: `{}`" -- "`{}` is a reserved scalar type name and can not be used." -- "The {} `{}` cannot be defined because a {} with that name already exists." -- "Key `{}` is already defined in {}." -- "Argument `{}` is already specified as unnamed argument." -- "Argument `{}` is already specified." -- "No such argument."" -- "Field `{}` is already defined on model `{}`." -- "Field `{}` in model `{}` can't be a list. The current connector does not support lists of primitive types." -- "The index name `{}` is declared multiple times. With the current connector index names have to be globally unique." -- "Value `{}` is already defined on enum `{}`." -- "Attribute not known: `@{}`." -- "Function not known: `{}`." -- "Datasource provider not known: `{}`." -- "shadowDatabaseUrl is the same as url for datasource `{}`. Please specify a different database as shadow database." -- "The preview feature `{}` is not known. Expected one of: {}" -- "`{}` is not a valid value for {}." -- "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 `{}`: {}." -- "Error validating model `{}`: {}" -- "Error validating field `{}` in model `{}`: {}" -- "Error validating datasource `{datasource}`: {message}"" -- "Error validating enum `{}`: {}" -- "Error validating: {}" - #### P1013 "The provided database string is invalid. {details}" @@ -181,6 +136,14 @@ Possible errors: "Server has closed the connection." +#### P1018 + +"{message}" + +#### P1019 + +"{message}" + ### Prisma Client (Query Engine) #### P2000 @@ -281,7 +244,7 @@ Possible errors: #### P2024 -"Timed out fetching a new connection from the connection pool. (More info: [http://pris.ly/d/connection-pool](http://pris.ly/d/connection-pool), Current connection limit: {connection_limit})" +"Timed out fetching a new connection from the connection pool. More info: http://pris.ly/d/connection-pool (Current connection pool timeout: {timeout}, connection limit: {connection_limit})" #### P2025 @@ -295,10 +258,26 @@ Possible errors: "Multiple errors occurred on the database during query execution: {errors}" +#### P2028 + +"Transaction API error: {error}" + +#### P2029 + +"Query parameter limit exceeded error: {message}." + #### P2030 "Cannot find a fulltext index to use for the search, try adding a @@fulltext([Fields...]) to your schema" +#### P2031 + +"Prisma needs to perform transactions, which requires your MongoDB server to be run as a replica set. https://pris.ly/d/mongodb-replica-set" + +#### P2032 + +"Error converting field \"{field}\" of expected non-nullable type \"{expected_type}\" found incompatible value of \"{found}\"." + ### Prisma Migrate (Migration Engine) #### P3000 @@ -315,7 +294,7 @@ Possible errors: #### P3003 -"The format of migrations changed, the saved migrations are no longer valid. To solve this problem, please follow the steps at: [https://pris.ly/d/migrate](https://pris.ly/d/migrate)" +"The format of migrations changed, the saved migrations are no longer valid. To solve this problem, please follow the steps at: https://pris.ly/d/migrate" #### P3004 @@ -323,7 +302,7 @@ Possible errors: #### P3005 -"The database schema for `{database_name}` is not empty. Read more about how to baseline an existing production database: [https://pris.ly/d/migrate-baseline](https://pris.ly/d/migrate-baseline)" +"The database schema is not empty. Read more about how to baseline an existing production database: https://pris.ly/d/migrate-baseline" #### P3006 @@ -339,7 +318,7 @@ Possible errors: #### P3009 -"migrate found failed migrations in the target database, new migrations will not be applied. Read more about how to resolve migration issues in a production database: [https://pris.ly/d/migrate-resolve](https://pris.ly/d/migrate-resolve)
{details}" +"migrate found failed migrations in the target database, new migrations will not be applied. Read more about how to resolve migration issues in a production database: https://pris.ly/d/migrate-resolve
{details}" #### P3010 @@ -355,11 +334,11 @@ Possible errors: #### P3013 -"Datasource provider arrays are no longer supported in migrate. Please change your datasource to use a single provider. Read more at [https://pris.ly/multi-provider-deprecation](https://pris.ly/multi-provider-deprecation)" +"Datasource provider arrays are no longer supported in migrate. Please change your datasource to use a single provider. Read more at https://pris.ly/multi-provider-deprecation" #### P3014 -"Prisma Migrate could not create the shadow database. Please make sure the database user has permission to create databases. More info: [https://pris.ly/d/migrate-shadow](https://pris.ly/d/migrate-shadow). Original error: {error_code}
{inner_error}" +"Prisma Migrate could not create the shadow database. Please make sure the database user has permission to create databases. Read more about the shadow database (and workarounds) at https://pris.ly/d/migrate-shadow

Original error: {error_code}
{inner_error}" #### P3015 @@ -375,11 +354,11 @@ Possible errors: #### P3018 -"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

Migration name: {migration_name}

Database error code: {database_error_code}

Database error:
{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

Migration name: {migration_name}

Database error code: {database_error_code}

Database error:
{database_error} " #### P3019 -"The datasource provider `{provider}` specified in your schema does not match the one specified in the migration_lock.toml, `{expected_provider}`. Please remove your current migration directory and start a new migration history with prisma migrate dev. Read more: [https://pris.ly/d/migrate-provider-switch](https://pris.ly/d/migrate-provider-switch)" +"The datasource provider `{provider}` specified in your schema does not match the one specified in the migration_lock.toml, `{expected_provider}`. Please remove your current migration directory and start a new migration history with prisma migrate dev. Read more: https://pris.ly/d/migrate-provider-switch" #### P3020 From 7ece81fd099adb76c54ad02e9f159130087047b8 Mon Sep 17 00:00:00 2001 From: Lucy Keer Date: Tue, 8 Mar 2022 12:21:42 +0000 Subject: [PATCH 2/2] Update 250-error-reference.mdx Manually tweak generated errors --- .../200-api-reference/250-error-reference.mdx | 60 ++++++++++++++++--- 1 file changed, 51 insertions(+), 9 deletions(-) diff --git a/content/400-reference/200-api-reference/250-error-reference.mdx b/content/400-reference/200-api-reference/250-error-reference.mdx index bcdb8a4975..2e92d18e80 100644 --- a/content/400-reference/200-api-reference/250-error-reference.mdx +++ b/content/400-reference/200-api-reference/250-error-reference.mdx @@ -90,10 +90,16 @@ Prisma Client throws a `PrismaClientValidationError` exception if validation fai #### P1002 -"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} " +"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}` " #### P1003 +"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}`." + #### P1008 "Operations timed out after `{time}`. Context: {context}" @@ -116,6 +122,42 @@ Prisma Client throws a `PrismaClientValidationError` exception if validation fai Possible errors: +- "Argument `{}` is missing." +- "Function `{}` takes {} arguments, but received {}." +- "Argument `{}` is missing in attribute `@{}`." +- "Argument `{}` is missing in data source block `{}`." +- "Argument `{}` is missing in generator block `{}`." +- "Error parsing attribute `@{}`: {}" +- "Attribute `@{}` is defined twice." +- "The model with database name `{}` could not be defined because another model with this name exists: `{}`" +- "`{}` is a reserved scalar type name and can not be used." +- "The {} `{}` cannot be defined because a {} with that name already exists." +- "Key `{}` is already defined in {}." +- "Argument `{}` is already specified as unnamed argument." +- "Argument `{}` is already specified." +- "No such argument."" +- "Field `{}` is already defined on model `{}`." +- "Field `{}` in model `{}` can't be a list. The current connector does not support lists of primitive types." +- "The index name `{}` is declared multiple times. With the current connector index names have to be globally unique." +- "Value `{}` is already defined on enum `{}`." +- "Attribute not known: `@{}`." +- "Function not known: `{}`." +- "Datasource provider not known: `{}`." +- "shadowDatabaseUrl is the same as url for datasource `{}`. Please specify a different database as shadow database." +- "The preview feature `{}` is not known. Expected one of: {}" +- "`{}` is not a valid value for {}." +- "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 `{}`: {}." +- "Error validating model `{}`: {}" +- "Error validating field `{}` in model `{}`: {}" +- "Error validating datasource `{datasource}`: {message}"" +- "Error validating enum `{}`: {}" +- "Error validating: {}" + #### P1013 "The provided database string is invalid. {details}" @@ -244,7 +286,7 @@ Possible errors: #### P2024 -"Timed out fetching a new connection from the connection pool. More info: http://pris.ly/d/connection-pool (Current connection pool timeout: {timeout}, connection limit: {connection_limit})" +"Timed out fetching a new connection from the connection pool. (More info: [http://pris.ly/d/connection-pool](http://pris.ly/d/connection-pool), Current connection limit: {connection_limit})" #### P2025 @@ -276,7 +318,7 @@ Possible errors: #### P2032 -"Error converting field \"{field}\" of expected non-nullable type \"{expected_type}\" found incompatible value of \"{found}\"." +"Error converting field "{field}" of expected non-nullable type "{expected_type}" found incompatible value of "{found}"." ### Prisma Migrate (Migration Engine) @@ -294,7 +336,7 @@ Possible errors: #### P3003 -"The format of migrations changed, the saved migrations are no longer valid. To solve this problem, please follow the steps at: https://pris.ly/d/migrate" +"The format of migrations changed, the saved migrations are no longer valid. To solve this problem, please follow the steps at: [https://pris.ly/d/migrate](https://pris.ly/d/migrate)" #### P3004 @@ -302,7 +344,7 @@ Possible errors: #### P3005 -"The database schema is not empty. Read more about how to baseline an existing production database: https://pris.ly/d/migrate-baseline" +"The database schema for `{database_name}` is not empty. Read more about how to baseline an existing production database: [https://pris.ly/d/migrate-baseline](https://pris.ly/d/migrate-baseline)" #### P3006 @@ -318,7 +360,7 @@ Possible errors: #### P3009 -"migrate found failed migrations in the target database, new migrations will not be applied. Read more about how to resolve migration issues in a production database: https://pris.ly/d/migrate-resolve
{details}" +"migrate found failed migrations in the target database, new migrations will not be applied. Read more about how to resolve migration issues in a production database: [https://pris.ly/d/migrate-resolve](https://pris.ly/d/migrate-resolve)
{details}" #### P3010 @@ -334,11 +376,11 @@ Possible errors: #### P3013 -"Datasource provider arrays are no longer supported in migrate. Please change your datasource to use a single provider. Read more at https://pris.ly/multi-provider-deprecation" +"Datasource provider arrays are no longer supported in migrate. Please change your datasource to use a single provider. Read more at [https://pris.ly/multi-provider-deprecation](https://pris.ly/multi-provider-deprecation)" #### P3014 -"Prisma Migrate could not create the shadow database. Please make sure the database user has permission to create databases. Read more about the shadow database (and workarounds) at https://pris.ly/d/migrate-shadow

Original error: {error_code}
{inner_error}" +"Prisma Migrate could not create the shadow database. Please make sure the database user has permission to create databases. More info: [https://pris.ly/d/migrate-shadow](https://pris.ly/d/migrate-shadow). Original error: {error_code}
{inner_error}" #### P3015 @@ -358,7 +400,7 @@ Possible errors: #### P3019 -"The datasource provider `{provider}` specified in your schema does not match the one specified in the migration_lock.toml, `{expected_provider}`. Please remove your current migration directory and start a new migration history with prisma migrate dev. Read more: https://pris.ly/d/migrate-provider-switch" +"The datasource provider `{provider}` specified in your schema does not match the one specified in the migration_lock.toml, `{expected_provider}`. Please remove your current migration directory and start a new migration history with prisma migrate dev. Read more: [https://pris.ly/d/migrate-provider-switch](https://pris.ly/d/migrate-provider-switch)" #### P3020