Skip to content

Commit

Permalink
fix: add debug output to panic message
Browse files Browse the repository at this point in the history
  • Loading branch information
timsuchanek committed May 13, 2020
1 parent f1eb2d7 commit da8f05e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/packages/engine-core/src/NodeEngine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import { convertLog, RustLog, RustError } from './log'
import { spawn, ChildProcessWithoutNullStreams } from 'child_process'
import byline from './byline'
import bent from 'bent'
import { getLogs } from '@prisma/debug'

const debug = debugLib('engine')
const exists = promisify(fs.exists)
Expand Down Expand Up @@ -564,7 +565,9 @@ ${this.lastErrorLog.fields.message}: ${this.lastErrorLog.fields.reason} in
${this.lastErrorLog.fields.file}:${this.lastErrorLog.fields.line}:${
this.lastErrorLog.fields.column
}`
const url = getGithubIssueUrl({ title: errorDescription })
const logs = getLogs()
const body = `Hi Prisma Team! My Prisma Client just crashed. These are the logs: \`\`\`\n${logs}\`\`\``
const url = getGithubIssueUrl({ title: errorDescription, body })
console.error(`${errorDescription}
This is a non-recoverable error which probably happens when the Prisma Query Engine has a panic.
Expand Down
10 changes: 10 additions & 0 deletions src/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit da8f05e

Please sign in to comment.