The Exception.toJSON function returns only three properties; (name, message and stack). If you want to define a new sub-class extending the Exception and let the class to export additional props (or remove some props), override this Exception.toJSON method.