A stakeholder escalates that your Node.js API's error messages expose internal file paths. What is the correct fix?
-
A
Disable error handling entirely
-
B
Catch errors and return sanitized messages in production, stripping stack traces from responses
-
C
Log paths to the database instead
-
D
Move files to hide the path names