Skip to content

Commit

Permalink
test(e2e): add new PrismaClient() in edge & mention Middleware in e…
Browse files Browse the repository at this point in the history
…rror (#22912)

(cherry picked from commit b5791ea)
  • Loading branch information
Jolg42 committed Feb 1, 2024
1 parent 022fae4 commit 04b508b
Show file tree
Hide file tree
Showing 15 changed files with 298 additions and 159 deletions.
2 changes: 1 addition & 1 deletion packages/client/scripts/default-deno-edge.ts
Expand Up @@ -2,7 +2,7 @@ class PrismaClient {
constructor() {
throw new Error(
`@prisma/client/deno/edge did not initialize yet. Please run "prisma generate" and try to import it again.
In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues`,
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)
}
}
Expand Down
Expand Up @@ -29,27 +29,27 @@ Prisma.prismaVersion = {

Prisma.PrismaClientKnownRequestError = () => {
throw new Error(\`PrismaClientKnownRequestError is unable to be run \${runtimeDescription}.
In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues\`,
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report\`,
)};
Prisma.PrismaClientUnknownRequestError = () => {
throw new Error(\`PrismaClientUnknownRequestError is unable to be run \${runtimeDescription}.
In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues\`,
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report\`,
)}
Prisma.PrismaClientRustPanicError = () => {
throw new Error(\`PrismaClientRustPanicError is unable to be run \${runtimeDescription}.
In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues\`,
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report\`,
)}
Prisma.PrismaClientInitializationError = () => {
throw new Error(\`PrismaClientInitializationError is unable to be run \${runtimeDescription}.
In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues\`,
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report\`,
)}
Prisma.PrismaClientValidationError = () => {
throw new Error(\`PrismaClientValidationError is unable to be run \${runtimeDescription}.
In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues\`,
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report\`,
)}
Prisma.NotFoundError = () => {
throw new Error(\`NotFoundError is unable to be run \${runtimeDescription}.
In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues\`,
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report\`,
)}
Prisma.Decimal = Decimal

Expand All @@ -58,19 +58,19 @@ Prisma.Decimal = Decimal
*/
Prisma.sql = () => {
throw new Error(\`sqltag is unable to be run \${runtimeDescription}.
In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues\`,
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report\`,
)}
Prisma.empty = () => {
throw new Error(\`empty is unable to be run \${runtimeDescription}.
In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues\`,
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report\`,
)}
Prisma.join = () => {
throw new Error(\`join is unable to be run \${runtimeDescription}.
In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues\`,
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report\`,
)}
Prisma.raw = () => {
throw new Error(\`raw is unable to be run \${runtimeDescription}.
In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues\`,
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report\`,
)}
Prisma.validator = Public.validator

Expand All @@ -79,11 +79,11 @@ Prisma.validator = Public.validator
*/
Prisma.getExtensionContext = () => {
throw new Error(\`Extensions.getExtensionContext is unable to be run \${runtimeDescription}.
In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues\`,
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report\`,
)}
Prisma.defineExtension = () => {
throw new Error(\`Extensions.defineExtension is unable to be run \${runtimeDescription}.
In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues\`,
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report\`,
)}

/**
Expand Down Expand Up @@ -323,7 +323,7 @@ class PrismaClient {
'workerd': 'Cloudflare Workers',
'deno': 'Deno and Deno Deploy',
'netlify': 'Netlify Edge Functions',
'edge-light': 'Vercel Edge Functions',
'edge-light': 'Vercel Edge Functions or Edge Middleware',
}[runtime]

let message = 'PrismaClient is unable to run in '
Expand All @@ -334,7 +334,7 @@ class PrismaClient {
}

message += \`
If this is unexpected, please open an issue: https://github.com/prisma/prisma/issues\`
If this is unexpected, please open an issue: https://pris.ly/prisma-prisma-bug-report\`

throw new Error(message)
}
Expand Down
Expand Up @@ -29,27 +29,27 @@ Prisma.prismaVersion = {

Prisma.PrismaClientKnownRequestError = () => {
throw new Error(\`PrismaClientKnownRequestError is unable to be run \${runtimeDescription}.
In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues\`,
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report\`,
)};
Prisma.PrismaClientUnknownRequestError = () => {
throw new Error(\`PrismaClientUnknownRequestError is unable to be run \${runtimeDescription}.
In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues\`,
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report\`,
)}
Prisma.PrismaClientRustPanicError = () => {
throw new Error(\`PrismaClientRustPanicError is unable to be run \${runtimeDescription}.
In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues\`,
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report\`,
)}
Prisma.PrismaClientInitializationError = () => {
throw new Error(\`PrismaClientInitializationError is unable to be run \${runtimeDescription}.
In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues\`,
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report\`,
)}
Prisma.PrismaClientValidationError = () => {
throw new Error(\`PrismaClientValidationError is unable to be run \${runtimeDescription}.
In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues\`,
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report\`,
)}
Prisma.NotFoundError = () => {
throw new Error(\`NotFoundError is unable to be run \${runtimeDescription}.
In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues\`,
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report\`,
)}
Prisma.Decimal = Decimal

Expand All @@ -58,19 +58,19 @@ Prisma.Decimal = Decimal
*/
Prisma.sql = () => {
throw new Error(\`sqltag is unable to be run \${runtimeDescription}.
In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues\`,
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report\`,
)}
Prisma.empty = () => {
throw new Error(\`empty is unable to be run \${runtimeDescription}.
In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues\`,
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report\`,
)}
Prisma.join = () => {
throw new Error(\`join is unable to be run \${runtimeDescription}.
In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues\`,
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report\`,
)}
Prisma.raw = () => {
throw new Error(\`raw is unable to be run \${runtimeDescription}.
In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues\`,
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report\`,
)}
Prisma.validator = Public.validator

Expand All @@ -79,11 +79,11 @@ Prisma.validator = Public.validator
*/
Prisma.getExtensionContext = () => {
throw new Error(\`Extensions.getExtensionContext is unable to be run \${runtimeDescription}.
In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues\`,
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report\`,
)}
Prisma.defineExtension = () => {
throw new Error(\`Extensions.defineExtension is unable to be run \${runtimeDescription}.
In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues\`,
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report\`,
)}

/**
Expand Down Expand Up @@ -323,7 +323,7 @@ class PrismaClient {
'workerd': 'Cloudflare Workers',
'deno': 'Deno and Deno Deploy',
'netlify': 'Netlify Edge Functions',
'edge-light': 'Vercel Edge Functions',
'edge-light': 'Vercel Edge Functions or Edge Middleware',
}[runtime]

let message = 'PrismaClient is unable to run in '
Expand All @@ -334,7 +334,7 @@ class PrismaClient {
}

message += \`
If this is unexpected, please open an issue: https://github.com/prisma/prisma/issues\`
If this is unexpected, please open an issue: https://pris.ly/prisma-prisma-bug-report\`

throw new Error(message)
}
Expand Down
Expand Up @@ -29,27 +29,27 @@ Prisma.prismaVersion = {

Prisma.PrismaClientKnownRequestError = () => {
throw new Error(\`PrismaClientKnownRequestError is unable to be run \${runtimeDescription}.
In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues\`,
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report\`,
)};
Prisma.PrismaClientUnknownRequestError = () => {
throw new Error(\`PrismaClientUnknownRequestError is unable to be run \${runtimeDescription}.
In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues\`,
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report\`,
)}
Prisma.PrismaClientRustPanicError = () => {
throw new Error(\`PrismaClientRustPanicError is unable to be run \${runtimeDescription}.
In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues\`,
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report\`,
)}
Prisma.PrismaClientInitializationError = () => {
throw new Error(\`PrismaClientInitializationError is unable to be run \${runtimeDescription}.
In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues\`,
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report\`,
)}
Prisma.PrismaClientValidationError = () => {
throw new Error(\`PrismaClientValidationError is unable to be run \${runtimeDescription}.
In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues\`,
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report\`,
)}
Prisma.NotFoundError = () => {
throw new Error(\`NotFoundError is unable to be run \${runtimeDescription}.
In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues\`,
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report\`,
)}
Prisma.Decimal = Decimal

Expand All @@ -58,19 +58,19 @@ Prisma.Decimal = Decimal
*/
Prisma.sql = () => {
throw new Error(\`sqltag is unable to be run \${runtimeDescription}.
In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues\`,
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report\`,
)}
Prisma.empty = () => {
throw new Error(\`empty is unable to be run \${runtimeDescription}.
In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues\`,
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report\`,
)}
Prisma.join = () => {
throw new Error(\`join is unable to be run \${runtimeDescription}.
In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues\`,
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report\`,
)}
Prisma.raw = () => {
throw new Error(\`raw is unable to be run \${runtimeDescription}.
In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues\`,
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report\`,
)}
Prisma.validator = Public.validator

Expand All @@ -79,11 +79,11 @@ Prisma.validator = Public.validator
*/
Prisma.getExtensionContext = () => {
throw new Error(\`Extensions.getExtensionContext is unable to be run \${runtimeDescription}.
In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues\`,
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report\`,
)}
Prisma.defineExtension = () => {
throw new Error(\`Extensions.defineExtension is unable to be run \${runtimeDescription}.
In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues\`,
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report\`,
)}

/**
Expand Down Expand Up @@ -344,7 +344,7 @@ class PrismaClient {
'workerd': 'Cloudflare Workers',
'deno': 'Deno and Deno Deploy',
'netlify': 'Netlify Edge Functions',
'edge-light': 'Vercel Edge Functions',
'edge-light': 'Vercel Edge Functions or Edge Middleware',
}[runtime]

let message = 'PrismaClient is unable to run in '
Expand All @@ -355,7 +355,7 @@ class PrismaClient {
}

message += \`
If this is unexpected, please open an issue: https://github.com/prisma/prisma/issues\`
If this is unexpected, please open an issue: https://pris.ly/prisma-prisma-bug-report\`

throw new Error(message)
}
Expand Down
Expand Up @@ -29,27 +29,27 @@ Prisma.prismaVersion = {

Prisma.PrismaClientKnownRequestError = () => {
throw new Error(\`PrismaClientKnownRequestError is unable to be run \${runtimeDescription}.
In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues\`,
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report\`,
)};
Prisma.PrismaClientUnknownRequestError = () => {
throw new Error(\`PrismaClientUnknownRequestError is unable to be run \${runtimeDescription}.
In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues\`,
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report\`,
)}
Prisma.PrismaClientRustPanicError = () => {
throw new Error(\`PrismaClientRustPanicError is unable to be run \${runtimeDescription}.
In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues\`,
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report\`,
)}
Prisma.PrismaClientInitializationError = () => {
throw new Error(\`PrismaClientInitializationError is unable to be run \${runtimeDescription}.
In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues\`,
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report\`,
)}
Prisma.PrismaClientValidationError = () => {
throw new Error(\`PrismaClientValidationError is unable to be run \${runtimeDescription}.
In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues\`,
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report\`,
)}
Prisma.NotFoundError = () => {
throw new Error(\`NotFoundError is unable to be run \${runtimeDescription}.
In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues\`,
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report\`,
)}
Prisma.Decimal = Decimal

Expand All @@ -58,19 +58,19 @@ Prisma.Decimal = Decimal
*/
Prisma.sql = () => {
throw new Error(\`sqltag is unable to be run \${runtimeDescription}.
In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues\`,
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report\`,
)}
Prisma.empty = () => {
throw new Error(\`empty is unable to be run \${runtimeDescription}.
In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues\`,
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report\`,
)}
Prisma.join = () => {
throw new Error(\`join is unable to be run \${runtimeDescription}.
In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues\`,
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report\`,
)}
Prisma.raw = () => {
throw new Error(\`raw is unable to be run \${runtimeDescription}.
In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues\`,
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report\`,
)}
Prisma.validator = Public.validator

Expand All @@ -79,11 +79,11 @@ Prisma.validator = Public.validator
*/
Prisma.getExtensionContext = () => {
throw new Error(\`Extensions.getExtensionContext is unable to be run \${runtimeDescription}.
In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues\`,
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report\`,
)}
Prisma.defineExtension = () => {
throw new Error(\`Extensions.defineExtension is unable to be run \${runtimeDescription}.
In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues\`,
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report\`,
)}

/**
Expand Down Expand Up @@ -344,7 +344,7 @@ class PrismaClient {
'workerd': 'Cloudflare Workers',
'deno': 'Deno and Deno Deploy',
'netlify': 'Netlify Edge Functions',
'edge-light': 'Vercel Edge Functions',
'edge-light': 'Vercel Edge Functions or Edge Middleware',
}[runtime]

let message = 'PrismaClient is unable to run in '
Expand All @@ -355,7 +355,7 @@ class PrismaClient {
}

message += \`
If this is unexpected, please open an issue: https://github.com/prisma/prisma/issues\`
If this is unexpected, please open an issue: https://pris.ly/prisma-prisma-bug-report\`

throw new Error(message)
}
Expand Down

0 comments on commit 04b508b

Please sign in to comment.