**Enonic version:**7.14.4
OS: MacOS
Im trying to access the “exception” field on the error param in my error controller:
export const handleError = (error) => {
log.info('STACK ' + JSON.stringify(error.exception, null, 2));
return {
body: 'Internal server error'
};
};
But it dosent exist? The code above logs “STACK undefined”. The docs states that the actual Java stack trace should be available: HTTP Error handler - Enonic Developer Portal
NOTE: The code above is written in TypeScript and is compiled to:
var handleError = function(error) {
log.info("STACK " + JSON.stringify(error.exception, null, 2));
return {
body: "Internal server error"
};
};