Capturing Laravel’s Error On Axios

Axios is a promised based http client.  Capturing laravel's 422 status error is a bit tricky because the returned data is a dynamic json key.  Here is a simple approach on how we can capture the error status code and throw an error using sweet alert 2.