Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQL error during creation of entry not handled properly #15713

Closed
dreerr opened this issue Sep 22, 2022 · 3 comments
Closed

SQL error during creation of entry not handled properly #15713

dreerr opened this issue Sep 22, 2022 · 3 comments

Comments

@dreerr
Copy link

dreerr commented Sep 22, 2022

Describe the Bug

I have a SQL table with a unique index which was generated with the command CREATE UNIQUE INDEX unique_names ON Akteure(lastName,firstName);

When trying to enter a duplicate item the Directus backend properly replies with at 400 error on the POST

In the frontend this error is not reflected, the form is stuck and the following is logged in the browser
Bildschirmfoto 2022-09-22 um 19 12 26

To Reproduce

  • Create an unique index on one or more fields
  • Try to input duplicate data

Errors Shown

No response

What version of Directus are you using?

9.18.0

What version of Node.js are you using?

16.13.1

What database are you using?

10.5.12-MariaDB

What browser are you using?

Safari 15.6

How are you deploying Directus?

locally

@azrikahar
Copy link
Contributor

Seems like this is the same issue as #15033, where the error from MySQL/MariaDB doesn't return the corresponding field causing said error, hence the app isn't "recognizing" the error in order to show it, as mentioned by this comment: #15033 (comment)

Closing this as duplicate of #15033, feel free to subscribe to it for future updates 👍

@azrikahar azrikahar closed this as not planned Won't fix, can't repro, duplicate, stale Sep 23, 2022
@azrikahar
Copy link
Contributor

Just to add on a potential workaround in the meantime, you can refer to this comment here: #15063 (comment)

@dreerr
Copy link
Author

dreerr commented Sep 23, 2022

Great that workaround works, sorry for not having found the duplicated issue!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants