Skip to content

TypeError: Cannot read property 'padEnd' of undefined #4117

@royra

Description

@royra

Bug description

This error happens a few dozen times a day on prod, so I can't easily reproduce it locally.
Example stack trace:

TypeError: Cannot read property 'padEnd' of undefined
    at Object.Jf [as getErrorMessageWithLink] (/project/webpack:/engine-core/src/Engine.ts:109:32)
    at yw.handleRequestError (/project/webpack:/engine-core/src/NodeEngine.ts:1209:11)
    at /project/webpack:/engine-core/src/NodeEngine.ts:1007:36
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at $w.request (/project/webpack:/home/circleci/project/node_modules/@prisma/client/runtime/src/runtime/getPrismaClient.ts:1225:24)

We're using webpack, and looks like os.platform is undefined.
The actual error is not included in the stack, as the error is in the error handling :)

It would be nice if general errors like this could be caught in the error handling flow so the original error stack can be seen.

Prisma information

Prisma 2.9.0 on Node 12.18 (AWS lambda).

Metadata

Metadata

Assignees

Labels

bug/0-unknownBug is new, does not have information for reproduction or reproduction could not be confirmed.kind/bugA reported bug.topic: prisma-client

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions