0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-03 23:00:14 -05:00

Added help & ghostErrorCode properties to API errors

- This is initial ground work to enable us to do a full error audit
- We want to prevent Ghost admin from ever showing any unhandled errors
- Additionally we want to ensure all handled errors are well worded & have context+help
This commit is contained in:
Hannah Wolfe 2021-10-04 09:13:47 +01:00
parent 25b0657784
commit ec64ead47d
No known key found for this signature in database
GPG key ID: 9F8C7532D0A6BA55

View file

@ -77,8 +77,10 @@ _private.JSONErrorRenderer = (err, req, res, next) => { // eslint-disable-line n
errors: [{
message: err.message,
context: err.context,
help: err.help,
errorType: err.errorType,
errorDetails: err.errorDetails
errorDetails: err.errorDetails,
ghostErrorCode: err.ghostErrorCode
}]
});
};