-
-
Notifications
You must be signed in to change notification settings - Fork 9.2k
Closed
Labels
issue: bugIssue reporting a bugIssue reporting a bugseverity: mediumIf it breaks the basic use of the product but can be worked aroundIf it breaks the basic use of the product but can be worked aroundsource: core:strapiSource is core/strapi packageSource is core/strapi packagestatus: confirmedConfirmed by a Strapi Team member or multiple community membersConfirmed by a Strapi Team member or multiple community members
Description
related to #1175
Informations
- Node.js version:
12.14.0 - npm version:
6.13.4 - Strapi version:
3.0.4 - Database:
SQlite (default) - Operating system:
Linux version 3.10.105
What is the current behavior?
The returned error message isn't clear
Steps to reproduce the problem
Post an object that is already exist and the field that we insert duplicate data is "unique"
We get (returned response):
{
"statusCode":500,
"error":"Internal Server Error",
"message":"An internal server error occurred"
}
Strapi console:
error Error: SQLITE_CONSTRAINT: UNIQUE constraint failed: members.email
debug POST /[path]/ (27 ms) 500
What is the expected behavior?
To return a better message to know if the data is duplicated or if the server occurred a real error.
Suggested solutions
Change the returned error messages, pass the SQlite error along
mizvyt, Lepshiz, martincapek, IHsuanLu, FreTimmerman and 4 more
Metadata
Metadata
Assignees
Labels
issue: bugIssue reporting a bugIssue reporting a bugseverity: mediumIf it breaks the basic use of the product but can be worked aroundIf it breaks the basic use of the product but can be worked aroundsource: core:strapiSource is core/strapi packageSource is core/strapi packagestatus: confirmedConfirmed by a Strapi Team member or multiple community membersConfirmed by a Strapi Team member or multiple community members