Closed dxps closed 1 year ago
Trying to create an article with the same slug it returns an HTTP RC 500.
slug
And in the log it throws this:
2023-01-29T20:59:05.718215Z DEBUG backend::app_errors: From sqlx err: Database(PgDatabaseError { severity: Error, code: "23505", message: "duplicate key value violates unique constraint \"unique_slug\"", detail: Some("Key (slug)=(how-to-train-your-dragon) already exists."), hint: None, position: None, where: None, schema: Some("public"), table: Some("articles"), column: None, data_type: None, constraint: Some("unique_slug"), file: Some("nbtinsert.c"), line: Some(663), routine: Some("_bt_check_unique") })
It should return a 422 (Unprocessable Entity).
Trying to create an article with the same
slug
it returns an HTTP RC 500.And in the log it throws this:
It should return a 422 (Unprocessable Entity).