class UnsupportedMigrationError
extends Error
Since 0.4.0

Thrown by IDatabaseService.migrate because programmatic migrations are not implemented by the current adapters.

Each adapter owns schema migration through its own CLI. The refusal is a permanent framework capability boundary, so it rejects with a 501 hint rather than reading as an internal server fault.

Examples

Example 1

import { UnsupportedMigrationError } from '@setu-ts/database-plugin';

try {
  await db.migrate();
} catch (error) {
  if (error instanceof UnsupportedMigrationError) {
    console.error(error.message);
  }
}

Constructors

UnsupportedMigrationError(message: string)

Creates the error with an operator-facing diagnostic that is never served.

Parameters
message: string

The full diagnostic, safe to log

Properties

readonly
name: string

Discriminant for consumers that cannot use instanceof across realms.

Usage

import { UnsupportedMigrationError } from "database-plugin/src/index.ts";