So I have been getting errors not caught by the astro build process
and when I run the @astro/node standalone server I get 500 server but with nothing else anywhere.
I don't think this is normal
an example is to have an api endpoint with a middleware
and not formatting correctly the return of the api it do a 500 error but don't log to the console the MiddlewareNotAResponse: Any data returned from middleware must be a valid Response object.
I had to go in the entry.mjs and add a console.error in the catch like below
} catch (err) {
+ console.log(err);
if (!res.headersSent) {
res.writeHead(500, `Server error`);
res.end();
}
}
Is it normal or not ?