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
Throwing an error in instrumentation.ts file should terminate next start with an error code. The error message and the stack should be written to the console.
Non-Goals
No response
Background
I'm trying to use instrumentation to validate ENV variables passed at runtime. It seems perfect for it, but the current behavior doesn't allow it. Running next dev with an error in instrumentation will fail as expected, but next start will keep the server running, but it won't respond to requests for pages except for the very first one.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Goals
Throwing an error in
instrumentation.ts
file should terminatenext start
with an error code. The error message and the stack should be written to the console.Non-Goals
No response
Background
I'm trying to use instrumentation to validate ENV variables passed at runtime. It seems perfect for it, but the current behavior doesn't allow it. Running
next dev
with an error in instrumentation will fail as expected, butnext start
will keep the server running, but it won't respond to requests for pages except for the very first one.Proposal
Beta Was this translation helpful? Give feedback.
All reactions