Skip to content

Package.save() throws an Error #9

@martinpetrov1096

Description

@martinpetrov1096

when trying to update a package, I get an exception thrown after I call package.save().
Here is the error:
ERROR: Update Failed. error: syntax error at or near "Jan" (node:59961) UnhandledPromiseRejectionWarning: TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be of type string or an instance of Buffer, ArrayBuffer, or Array or an Array-like Object. Received function format at Function.from (buffer.js:333:9) at ServerResponse.send (/Users/martin/Documents/GitHub/AI-API/backend/backend/node_modules/express/lib/response.js:189:22) at /Users/martin/Documents/GitHub/AI-API/backend/backend/src/routes/packagesRoute.ts:114:37 at processTicksAndRejections (internal/process/task_queues.js:93:5) (Use node --trace-warnings ...to show where the warning was created) (node:59961) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag--unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1) (node:59961) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Something related to setting/saving the date I'm guessing?

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions