Your API errors are JSON (good!) but they currently leak too much information about your back end e.g. table names, file names and paths, stack traces etc. Although it's great for debugging it's also a security risk. It may be worth considering how you can use an error handling middleware to return less detailed information to the front end users while logging more detailed information on the back end.
Your API errors are JSON (good!) but they currently leak too much information about your back end e.g. table names, file names and paths, stack traces etc. Although it's great for debugging it's also a security risk. It may be worth considering how you can use an error handling middleware to return less detailed information to the front end users while logging more detailed information on the back end.