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
The response of a Netlify Function incurring in timeout is �[91m◈�[39m Function invocation failed: [object Object] instead of a clear explanation of the timeout issue.
caesarsol
changed the title
Function response body after timeout is non informative
[Functions] Response body after Timeout is mangled and non-informative
Oct 21, 2020
Describe the bug
The response of a Netlify Function incurring in timeout is
�[91m◈�[39m Function invocation failed: [object Object]
instead of a clear explanation of the timeout issue.To Reproduce
Steps to reproduce the behavior:
netlify dev
Configuration
netlify.toml
:npx envinfo
:Expected behavior
A more informative output.
Maybe in JSON format, or customizable by the user?
CLI Output
Additional context
This is what I've found:
Function invocation failed
is created here:cli/src/utils/serve-functions.js
Lines 20 to 25 in f1b2502
◈
char for console output, but being not used in console this messes up the output with non utf-8 chars[object Object]
is the result of anerror.toString()
on something which apparently inherits from ObjectTimeoutError
is generated bylambda-local
, but gets later translated into a plain Object here:https://github.com/ashiina/lambda-local/blob/develop/src/lib/context.ts#L181-L185
I am now going to write a quick PR to make the actual error appear in the HTTP body.
The text was updated successfully, but these errors were encountered: