Sets error detail to false for ajax requests
so we can return a custom error response instead
of an exception