message < Error < JavaScript
Error objects are thrown when runtime errors occur. The Error object can also be used as a base object for user-defined exceptions. Besides the base Error constructor, there are other more-specific error constructors in JavaScript such as EvalError, SyntaxError, TypeError, etc. The message property of an Error object is a human-readable description of the error.
const error = new Error("Could not parse input");
throw error;
console.log(error.message);
// "error.message is '"Could not parse input"