Level 2
Here is how I manage to do it to focus on the input on error.
Nova.request().interceptors.response.use(function (response) {
return response;
}, function (error) {
// Focus first input field with error
let firstError = Object.keys(error.response.data.errors)[0];
let input = document.getElementById(firstError);
if(input) input.focus()
return Promise.reject(error);
});
But I think its good idea to just add it in nova itself.
I still can't handle the exception from app/Exceptions/Handler.php can someone help