Error map
1022 MySQL ERROR 1022 (23000): Can't write; duplicate key in table
MySQL · layer 5, Data
Centre: this error. First ring: errors it is linked with (12). Outer ring: what those are linked with. Colours show the layer of a request each error belongs to. Click any dot to re-centre the map on it; hover to follow its connections. The centre dot opens the error page.
Directly related (12)
Rails: ActiveRecord::PendingMigrationError — Migrations are pending. To resolve this issue, run: bin/rails db:migrate
The database schema is behind the migration files in the app.
MySQL ERROR 1062 (23000): Duplicate entry for key
An INSERT/UPDATE would create a duplicate value in a PRIMARY or UNIQUE key.
MySQL ERROR 1146 (42S02): Table 'db.table' doesn't exist
The query references a table that MySQL can’t find in that database.
MySQL ERROR 1418 (HY000): This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled
Creating a stored function failed because binary logging requires it to declare its data access characteristics.
DbUpdateException: An error occurred while saving the entity changes. See the inner exception for details.
SaveChanges failed in the database; the inner exception (SqlException/PostgresException) has the real reason — constraint violati…
MySQL ERROR 1452: Cannot add or update a child row: a foreign key constraint fails
You inserted/updated a row whose foreign key value doesn’t exist in the referenced parent table.
django.db.utils.OperationalError: no such table: app_model
Django queried a table that hasn’t been created — migrations missing or not applied.
API Error: Resource already exists (ALREADY_EXISTS / resource_already_exists / 409)
The create request was refused because an object with the same unique identity — name, email, external ID — already exists.
dotnet ef: Unable to create a 'DbContext' of type ''. The exception 'Unable to resolve service for type DbContextOptions' was thrown while attempting to create an instance
dotnet ef migrations couldn’t construct your DbContext at design time.
Laravel migration: SQLSTATE[HY000]: General error: 1005 Can't create table (errno: 150 "Foreign key constraint is incorrectly formed")
MySQL can't create the foreign key because column types, order or engines don't match the referenced table.
MySQL ERROR 1048 (23000): Column 'x' cannot be null
An INSERT/UPDATE put NULL into a NOT NULL column.
Rails: ActiveRecord::StatementInvalid: PG::DuplicateColumn: ERROR: column "status" of relation "orders" already exists
A migration tried to add a column/table/index that already exists.
Two steps away (36)
PostgreSQL: ERROR: relation "x" does not exist
The table/view isn’t found — missing migration, wrong schema, or a case-sensitive quoted name.
MySQL ERROR 1051 (42S02): Unknown table 'x'
DROP TABLE targeted a table that doesn’t exist.
MySQL ERROR 1060 (42S21): Duplicate column name 'x'
A CREATE/ALTER adds a column that already exists, or a SELECT in a view/derived table produces two columns with the same name.
Deadlock found when trying to get lock; try restarting transaction
Two transactions waited on each other’s locks; the database killed one so the other could continue.
HTTP 409 Conflict
The request conflicts with the current state of the resource — e.g. a duplicate or an edit based on an outdated version.
Subquery returns more than 1 row (MySQL 1242) / more than one row returned by a subquery used as an expression
A subquery used where a single value is expected (`= (SELECT …)`) returned several rows.
MySQL ERROR 1044 (42000): Access denied for user to database
The login succeeded, but the user has no privileges on the database you’re using.
MySQL ERROR 1064 (42000): You have an error in your SQL syntax
MySQL couldn’t parse the query. The text after “near” shows where parsing failed.
MySQL ERROR 1054 (42S22): Unknown column in 'field list'
The query references a column that doesn’t exist in the table (or an unquoted string being read as a column).
MySQL ERROR 1045 (28000): Access denied for user
MySQL rejected the login — wrong password, wrong user/host combination, or the user doesn’t exist.
MySQL ERROR 1040 (08004): Too many connections
MySQL reached `max_connections` and refuses new clients.
MySQL ERROR 1005 (HY000): Can't create table (errno: 150 "Foreign key constraint is incorrectly formed")
A foreign key definition is invalid — the referenced column’s type, index or charset doesn’t match.
JsonException: A possible object cycle was detected
System.Text.Json found a reference loop (e.g. Order → Customer → Orders → …) while serialising, usually from EF Core navigation p…
PostgreSQL: ERROR: duplicate key value violates unique constraint
An INSERT/UPDATE would create a duplicate in a UNIQUE or PRIMARY KEY column — or the id sequence is behind the existing data.
org.hibernate.exception.ConstraintViolationException: could not execute statement
The database rejected an insert/update because of a constraint (unique, foreign key, not null).
MySQL ERROR 1215 (HY000): Cannot add foreign key constraint
The foreign key can’t be created — mismatched column types, missing index, or incompatible engines/collations.
MySQL ERROR 1451 (23000): Cannot delete or update a parent row: a foreign key constraint fails
You tried to delete/update a row that other rows still reference.
ERROR: insert or update on table "x" violates foreign key constraint "fk" — Key (user_id)=(5) is not present in table "users"
The row references a parent row that doesn’t exist.
django.core.exceptions.ImproperlyConfigured: settings are not configured / SECRET_KEY must not be empty
Django can’t load its settings — DJANGO_SETTINGS_MODULE unset, a required setting missing, or an environment variable not provide…
django.core.exceptions.DisallowedHost: Invalid HTTP_HOST header: 'x'. You may need to add 'x' to ALLOWED_HOSTS.
The request’s Host header isn’t listed in Django’s ALLOWED_HOSTS.
django.template.exceptions.TemplateDoesNotExist: app/page.html
Django searched all template directories and couldn’t find that template.
MongoServerError: E11000 duplicate key error collection: db.users index: email_1 dup key
An insert/update violated a unique index in MongoDB.
PrismaClientKnownRequestError P2002: Unique constraint failed on the fields: (`email`)
A Prisma create/update violated a unique constraint.
ERROR: update or delete on table "users" violates foreign key constraint on table "orders" — Key (id)=(5) is still referenced
You tried to delete a row that other rows still reference.
InvalidOperationException: Unable to resolve service for type 'X' while attempting to activate 'Y'
ASP.NET Core’s dependency injection container can’t build Y because one of its constructor dependencies (X) was never registered.
MySQL ERROR 1061 (42000): Duplicate key name 'x'
CREATE INDEX/ADD INDEX used an index name that already exists on the table.
MySQL ERROR 1091 (42000): Can't DROP 'x'; check that column/key exists
ALTER TABLE tried to drop a column or index that doesn’t exist.
Laravel: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'db.sessions' doesn't exist
Laravel queried a table that hasn’t been created — usually sessions, cache, jobs or a new model’s table.
Laravel: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'x@example.com' for key 'users_email_unique'
The query violated a database constraint — a duplicate value in a unique column or a missing/blocked foreign key.
Laravel: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'status' in 'field list'
The SQL refers to a column that doesn't exist in the table — a missing migration, typo or wrong table.
HTTP 422 Unprocessable Content
The request is well-formed, but the data fails validation (e.g. invalid email, missing required field).
MySQL ERROR 1406: Data too long for column
The value is longer than the column allows (e.g. 300 characters into VARCHAR(255)), and strict mode rejects it instead of truncat…
java.lang.IllegalArgumentException
A method rejected an argument value as invalid.
ERROR: relation "x" already exists
CREATE TABLE/INDEX/SEQUENCE used a name that already exists in that schema.
ERROR: column "x" of relation "y" already exists
ALTER TABLE ADD COLUMN for a column that’s already there.
ERROR: cannot drop table x because other objects depend on it
Views, foreign keys or other objects depend on what you’re dropping.