Constructor
# new BaseError(name, msg, code)
Abstract base error class that all other error types extend from. Provides common error handling functionality.
Base error class for the repository module
Parameters:
Name | Type | Description |
---|---|---|
name |
string
|
The name of the error |
msg |
string
|
Error
|
The error message or Error object |
code |
number
|
The HTTP status code associated with this error |
Example
// This is an abstract class and should not be instantiated directly
// Instead, use one of the concrete error classes:
throw new ValidationError('Invalid data provided');