Instead of just throwing exception on 401 auth, throw exception for any error code from 400 on This can be turned off with the option "http_errors" set to false Also updaed the exception content to match 400 or 500 error type with more information attached General Exception error codes: Cnnn: Curl errors (FAILURE) Rnnn: general class errors (ERROR) Hnnn: http response errors (ERROR)