You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I originally had the commented out code active, and then tested with it commented out. I then got the first error shown below when sending a JSON object like { "args": [] } or { "args": ["string"] }, and the second error when removing args and sending an empty object {} or no body.
server started at http://0.0.0.0:3000
sqlite does not support inserting default values. Set the `useNullAsDefault` flag to hide this warning. (see docs https://knexjs.org/guide/query-builder.html#insert).
Ensure Schema: 22.764ms
{
message: "Cannot read properties of undefined (reading 'isNewRow')",
stack: [
"TypeError: Cannot read properties of undefined (reading 'isNewRow')",
' at Object.<anonymous> (/home/alex/c2/magiscrape/backend2/node_modules/.pnpm/remult@0.21.1/node_modules/remult/src/server-action.js:285:72)',
' at step (/home/alex/c2/magiscrape/backend2/node_modules/.pnpm/tslib@2.6.0/node_modules/tslib/tslib.js:195:27)',
' at Object.next (/home/alex/c2/magiscrape/backend2/node_modules/.pnpm/tslib@2.6.0/node_modules/tslib/tslib.js:176:57)',
' at fulfilled (/home/alex/c2/magiscrape/backend2/node_modules/.pnpm/tslib@2.6.0/node_modules/tslib/tslib.js:166:62)'
],
url: '/api/page_group/toggleCompleted',
method: 'POST'
}
/home/alex/c2/magiscrape/backend2/node_modules/.pnpm/remult@0.21.1/node_modules/remult/src/server-action.js:266
d.args = d.args.map(function (x) { return isCustomUndefined(x) ? undefined : x; });
^
TypeError: Cannot read properties of undefined (reading 'map')
at Object.<anonymous> (/home/alex/c2/magiscrape/backend2/node_modules/.pnpm/remult@0.21.1/node_modules/remult/src/server-action.js:266:53)
at step (/home/alex/c2/magiscrape/backend2/node_modules/.pnpm/tslib@2.6.0/node_modules/tslib/tslib.js:195:27)
at Object.next (/home/alex/c2/magiscrape/backend2/node_modules/.pnpm/tslib@2.6.0/node_modules/tslib/tslib.js:176:57)
at /home/alex/c2/magiscrape/backend2/node_modules/.pnpm/tslib@2.6.0/node_modules/tslib/tslib.js:169:75
at new Promise (<anonymous>)
at Object.__awaiter (/home/alex/c2/magiscrape/backend2/node_modules/.pnpm/tslib@2.6.0/node_modules/tslib/tslib.js:165:16)
at /home/alex/c2/magiscrape/backend2/node_modules/.pnpm/remult@0.21.1/node_modules/remult/src/server-action.js:260:257
at RemultServerImplementation.<anonymous> (/home/alex/c2/magiscrape/backend2/node_modules/.pnpm/remult@0.21.1/node_modules/remult/server/expressBridge.js:655:58)
at step (/home/alex/c2/magiscrape/backend2/node_modules/.pnpm/tslib@2.6.0/node_modules/tslib/tslib.js:195:27)
at Object.next (/home/alex/c2/magiscrape/backend2/node_modules/.pnpm/tslib@2.6.0/node_modules/tslib/tslib.js:176:57)
ELIFECYCLE Command failed with exit code 1.
Expected behavior
The function should be called without any problems
Desktop (please complete the following information):
OS: Ubuntu 20.04
Browser: Firefox
Version: ^0.21.1
The text was updated successfully, but these errors were encountered:
As opposed to static BackendMethods, instance BackendMethods (such as this one) require additional entity instance data in the request. In this case, the JSON object you send should look like this:
Describe the bug
There are two errors that happen when creating a backend method.
To Reproduce
I have some code like this:
I originally had the commented out code active, and then tested with it commented out. I then got the first error shown below when sending a JSON object like
{ "args": [] }
or{ "args": ["string"] }
, and the second error when removingargs
and sending an empty object{}
or no body.Expected behavior
The function should be called without any problems
Desktop (please complete the following information):
^0.21.1
The text was updated successfully, but these errors were encountered: