Basic Usage
Creating an Enhanced Error Object
import { ErrorEnhanced, IdentifiersEnhancer, Severity } from 'error-enhanced';
// Instantiate a new enhanced error object
const error = new ErrorEnhanced([
new IdentifiersEnhancer()
]);Setting Properties
error
.setErrorCode(404)
.setSeverity(Severity.HIGH);Accessing Properties
console.log(error.id); // Outputs a unique identifier for the error
console.log(error.severity); // Outputs the severity level, e.g., "HIGH"Last updated