Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Receiving an error to a function invoke raises an exception #147

Closed
Cubox opened this issue Mar 6, 2023 · 1 comment
Closed

Receiving an error to a function invoke raises an exception #147

Cubox opened this issue Mar 6, 2023 · 1 comment

Comments

@Cubox
Copy link

Cubox commented Mar 6, 2023

✖ Uncaught exception
/Users/a/a/scaleway-scheduler/node_modules/serverless/scripts/serverless.js:53
        throw error;
        ^

TypeError [ERR_INVALID_ARG_TYPE]: The "chunk" argument must be of type string or an instance of Buffer or Uint8Array. Received an instance of AxiosError
    at new NodeError (node:internal/errors:399:5)
    at _write (node:internal/streams/writable:315:13)
    at Writable.write (node:internal/streams/writable:337:10)
    at WriteStream.<anonymous> (/Users/a/a/a/node_modules/cli-progress-footer/lib/private/cli-progress-footer/override-std-props.js:56:5)
    at stream.write (/Users/a/a/a/node_modules/process-utils/lib/private/get-override-stream-write.js:12:54)
    at /Users/a/a/a/node_modules/serverless-scaleway-functions/invoke/scalewayInvoke.js:65:24
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  code: 'ERR_INVALID_ARG_TYPE'
}

Switching line 65 of scalewayInvoke.js to process.stderr.write(error.toString()); will return the error (which was a 403 in my situation).

@thomas-tacquet
Copy link
Contributor

thomas-tacquet commented Mar 7, 2023

Thank you for the detailed report ! Fixed and tested, once merged I will release it in the v0.4.6 version 👌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants