FrozenNode / Laravel-Administrator

An administrative interface package for Laravel

Home Page:http://administrator.frozennode.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

When saving a model from the admin panel, when a 500 response is seen, Administrator does not know what to do with it

t202wes opened this issue · comments

It should throw an error. For example, when saving a row that has a mysql error due to inserting with a non-unique field. It'll throw this.

QueryException in Connection.php line 669:
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '5-2' for key

With a 500 error on the ajax response.

This is valid, as this shouldn't work. But frozennode adminstrator does not show any error to the user. Is there any way to catch the errors and display them on the UI?

Currently administrator just does an ajax request, that responds with 500, and then does nothing. Unless the admin is technical, which they aren't always, they won't know why it's not working or an error even occured.

It seems like there should be a global catch all for all ajax requests to show an error in a modal or something if something failed with 400 or 500 HTTP related error codes.

+1
This is one of the biggest flaws in LA.

commented

Try to use validation and message... that will solve this problem...