text: export class ApplicationError extends Error {
    constructor(message, statusCode, isOperational = true, stack = '', errors = null) {
      super(message);
  
      this.statusCode = statusCode;
      this.isOperational = isOperational;
  
      if (errors) {
        this.errors = errors;
      }
  
      if (stack) {
        this.stack = stack;
      } else {
        Error.captureStackTrace(this, this.constructor);
      }
    }
  }
  