UNPKG

@directus/api

Version:

Directus is a real-time API and App dashboard for managing SQL database content

13 lines (12 loc) 429 B
import type { SQLError } from './dialects/types.js'; import type { Item } from '@directus/types'; /** * Translates an error thrown by any of the databases into a pre-defined Exception. Currently * supports: * - Invalid Foreign Key * - Not Null Violation * - Record Not Unique * - Value Out of Range * - Value Too Long */ export declare function translateDatabaseError(error: SQLError, data: Partial<Item>): Promise<any>;