pub trait SimpleUserFacingError {
    const ERROR_CODE: &'static str;
    const MESSAGE: &'static str;
}
Expand description

A less dynamic type of user-facing errors. This is used in the introspection and migration engines for simpler, more robust and helpful error handling — extra details are attached opportunistically.

Required Associated Constants§

source

const ERROR_CODE: &'static str

source

const MESSAGE: &'static str

Object Safety§

This trait is not object safe.

Implementors§

source§

impl SimpleUserFacingError for ConnectionClosed

source§

const ERROR_CODE: &'static str = "P1017"

source§

const MESSAGE: &'static str = "Server has closed the connection."

source§

impl SimpleUserFacingError for AzureMssqlShadowDb

source§

const ERROR_CODE: &'static str = "P3020"

source§

const MESSAGE: &'static str = "The automatic creation of shadow databases is disabled on Azure SQL. Please set up a shadow database using the `shadowDatabaseUrl` datasource attribute.\nRead the docs page for more details: https://pris.ly/d/migrate-shadow"

source§

impl SimpleUserFacingError for DatabaseMigrationFormatChanged

source§

const ERROR_CODE: &'static str = "P3003"

source§

const MESSAGE: &'static str = "The format of migrations changed, the saved migrations are no longer valid. To solve this problem, please follow the steps at: https://pris.ly/d/migrate"

source§

impl SimpleUserFacingError for DatabaseSchemaNotEmpty

source§

const ERROR_CODE: &'static str = "P3005"

source§

const MESSAGE: &'static str = "The database schema is not empty. Read more about how to baseline an existing production database: https://pris.ly/d/migrate-baseline"

source§

impl SimpleUserFacingError for DeprecatedProviderArray

source§

const ERROR_CODE: &'static str = "P3013"

source§

const MESSAGE: &'static str = "Datasource provider arrays are no longer supported in migrate. Please change your datasource to use a single provider. Read more at https://pris.ly/multi-provider-deprecation"

source§

impl SimpleUserFacingError for DirectDdlNotAllowed

source§

const ERROR_CODE: &'static str = "P3022"

source§

const MESSAGE: &'static str = "Direct execution of DDL (Data Definition Language) SQL statements is disabled on this database. Please read more here about how to handle this: https://pris.ly/d/migrate-no-direct-ddl"

source§

impl SimpleUserFacingError for ForeignKeyCreationNotAllowed

source§

const ERROR_CODE: &'static str = "P3021"

source§

const MESSAGE: &'static str = "Foreign keys cannot be created on this database. Learn more how to handle this: https://pris.ly/d/migrate-no-foreign-keys"

source§

impl SimpleUserFacingError for IntrospectionResultEmpty

source§

const ERROR_CODE: &'static str = "P4001"

source§

const MESSAGE: &'static str = "The introspected database was empty."

source§

impl SimpleUserFacingError for MigrationNameTooLong

source§

const ERROR_CODE: &'static str = "P3010"

source§

const MESSAGE: &'static str = "The name of the migration is too long. It must not be longer than 200 characters (bytes)."