Coding task · NestJS course · Module 6: Error Handling and Monitoring
Custom Exceptions Hierarchy
Create an abstract base class LegionaryException with code, severity, and recoverable fields
Task
Complete the abstract class LegionaryException extends Error with fields: code (string), severity ('LOW'|'MEDIUM'|'HIGH'|'CRITICAL'), recoverable (boolean), context (Record), and a toJSON() method