Open turacma opened 1 week ago
Forking the additional context to a new issue report
Hello @turacma
I just gave it a try by pointing a non-existing module and everything looks fine to me as per the shared screenshot. Are you seeing things differently?
Also, its worth mentioning. If you are running the production build (ie, the JavaScript output). You must cd
into the .medusa/server
directory and run it from there.
Also, its worth mentioning. If you are running the production build (ie, the JavaScript output). You must cd into the .medusa/server directory and run it from there.
Yep, this was noted in my other bug report. As noted there, FWIW, this didn't seem to be necessary with the preview build I was using previously.
Here's an example of breaking something in the middleware:
Might be be because it's a nested exception?
Might be be because it's a nested exception
Okay, yes. The cause
property is not entertained when the JSON output is used. Sure, this is something we will look into and fix.
Thanks for reporting the issue :)
Bug report
Describe the bug
When
NODE_ENV
is set to production/staging, the default logger switches to using JSON formatting, but when passed a error as part of a catch statement doesn't actually print the error details.System information
Medusa version (including plugins): Node.js version: 20.15.1 Database: Postgres Operating system: Mac OS Browser (if relevant): N/A
Steps to reproduce the behavior
export NODE_ENV=staging
orexport NODE_ENV=production
then start again, note that error is not printed, only stack trace and the message.Expected behavior
Ideally I would be able to provide my own logger implementation to use, but failing that, the bundled logger should at least print out the error details when providered.
Screenshots
N/A
Code snippets
N/A
Additional context
Not sure if related to my configuration or a general problem, but also noticing that when
NODE_ENV=staging|production
server fails to start up with the error