canvas icon indicating copy to clipboard operation
canvas copied to clipboard

Error StringExpected

Open ARR4NN opened this issue 2 years ago • 3 comments

when i use the code on the npm page to create the house I get

Error
    at createCanvas (C:\Users\User\Documents\Discord Bots\Suggestions\node_modules\@napi-rs\canvas\index.js:160:7)
    at Object.execute (C:\Users\User\Documents\Discord Bots\Suggestions\commands\user commands\profile.js:24:24)
    at processTicksAndRejections (node:internal/process/task_queues:96:5) {
  code: 'StringExpected'
}

the line 24 in profile.js is const canvas = createCanvas(300, 320)

ARR4NN avatar Mar 17 '22 17:03 ARR4NN

is it possible to make these errors more meaningful? Right now it's hard to debug what exactly went wrong because most of the errors are like

Error ...
    code: '<SomeType>Expected'

We have to depend upon the line number in the stacktrace

twlite avatar Aug 09 '22 12:08 twlite

I'll improve the error messages in NAPI-RS

Brooooooklyn avatar Aug 10 '22 15:08 Brooooooklyn

Related on Prisma side: https://github.com/prisma/prisma/issues/13864

janpio avatar Oct 13 '22 15:10 janpio