Class

ConnectionError

ConnectionError(msg) → {void}

Constructor

# new ConnectionError(msg) → {void}

This error is thrown when the application fails to establish a connection to a required service or resource

Error thrown when a connection to a service fails

Parameters:
Name Type Description
msg string | Error

The error message or Error object

View Source utils/errors.ts, line 42

void
Example
```typescript
// Example of throwing a ConnectionError
try {
  await database.connect();
} catch (error) {
  throw new ConnectionError('Failed to connect to database');
}
```