Simplify integrity error
Simplify integrity error
How simplify long integrity error e.g.
An SQL error occurred: SQLSTATE[23000]: Integrity constraint violation: 1451 Cannot delete or update a parent row: a foreign key constraint fails (......, CONSTRAINT ...... FOREIGN KEY (...... ) REFERENCES ...... (...... ) ON DELETE NO ACTION ON UPDATE NO ACTION)
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Do you mean you want to not show that error message to the end user?
If you use
postSubmit
you can check for anerror
parameter in the returned JSON and modify it as you need there.Another option is to apply a suitable validator to the Editor instance to not let it get that far that the SQL generated will fail.
Allan
I still want to show a short error massage.
postSubmit
sounds a good idea. for now I just used i18n which overrides the long error message.