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 use NodeJS v4 API functions. If there is an error on the root level of any function (or imported) file, no HTTP handlers are registered, therefore, every request returns 404 Not Found.
However, it is impossible to troubleshoot such errors because they don't show up in the deployment log.
To Reproduce
Add the following code to the top of an API function file, before app.http(...):
const OpenAI = require('openai');
const openai = new OpenAI({apiKey: process.env.OPENAI_API_KEY});
if OPENAI_API_KEY is not set in your environment, the function will throw an error and other handlers will not be registered. However, the build log will say that the build was successful.
Expected behavior
I expect the build to fail and the build log to contain the description of the error.
The text was updated successfully, but these errors were encountered:
Describe the bug
I use NodeJS v4 API functions. If there is an error on the root level of any function (or imported) file, no HTTP handlers are registered, therefore, every request returns 404 Not Found.
However, it is impossible to troubleshoot such errors because they don't show up in the deployment log.
To Reproduce
Add the following code to the top of an API function file, before
app.http(...)
:if
OPENAI_API_KEY
is not set in your environment, the function will throw an error and other handlers will not be registered. However, the build log will say that the build was successful.Expected behavior
I expect the build to fail and the build log to contain the description of the error.
The text was updated successfully, but these errors were encountered: