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 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…
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.
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.
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.
MySQL ERROR 1146 (42S02): Table 'db.table' doesn't exist
The query references a table that MySQL can’t find in that database.
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.
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 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.
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 1061 (42000): Duplicate key name 'x'
CREATE INDEX/ADD INDEX used an index name that already exists on the table.
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 1045 (28000): Access denied for user
MySQL rejected the login — wrong password, wrong user/host combination, or the user doesn’t exist.
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 1040 (08004): Too many connections
MySQL reached `max_connections` and refuses new clients.
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.
MySQL ERROR 1048 (23000): Column 'x' cannot be null
An INSERT/UPDATE put NULL into a NOT NULL column.
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 1091 (42000): Can't DROP 'x'; check that column/key exists
ALTER TABLE tried to drop a column or index that doesn’t exist.
ERROR: relation "x" already exists
CREATE TABLE/INDEX/SEQUENCE used a name that already exists in that schema.
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.
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.
Laravel: No application encryption key has been specified.
Laravel’s APP_KEY is missing, so it can’t encrypt sessions and cookies.
Laravel: 419 Page Expired (CSRF token mismatch)
Laravel rejected a POST because the CSRF token was missing, expired or didn’t match the session.
Laravel: Target class [App\Http\Controllers\X] does not exist.
Laravel’s container couldn’t find the controller or class named in a route or binding.
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).
ERROR: column "x" of relation "y" already exists
ALTER TABLE ADD COLUMN for a column that’s already there.
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: 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.
org.hibernate.LazyInitializationException: could not initialize proxy - no Session
A lazy-loaded association was accessed after the Hibernate session/transaction closed.
org.hibernate.TransientObjectException: object references an unsaved transient instance - save the transient instance before flushing
An entity references another entity that hasn’t been saved yet, and no cascade is configured.
IncorrectResultSizeDataAccessException: query did not return a unique result: 2
A query expected one row but found several.
MySQL ERROR 1007 (HY000): Can't create database 'x'; database exists
CREATE DATABASE ran for a database that already exists.
MySQL ERROR 1008 (HY000): Can't drop database 'x'; database doesn't exist
DROP DATABASE targeted a database that isn’t there.
MySQL ERROR 1067 (42000): Invalid default value for 'created_at'
A column’s DEFAULT isn’t allowed in the current SQL mode — classically '0000-00-00 00:00:00' with NO_ZERO_DATE.
Map another error
Popular: 403500400TypeErrorCritical error0xC000007BNullPointerException404