Class

InternalError

InternalError(msg) → {InternalError}

Constructor

# new InternalError(msg) → {InternalError}

Represents an internal failure (should mean an error in code) with HTTP 500 status code

Error thrown for internal system failures

Parameters:
Name Type Description
msg string | Error

The error message or Error object

View Source repository/errors.ts, line 43

A new InternalError instance

Example
// Throw an internal error when an unexpected condition occurs
try {
  // Some operation
} catch (error) {
  throw new InternalError('Unexpected internal error occurred');
}