teepluss / laravel-hmvc

HMVC is a tool for making internal request.
76 stars 20 forks source link

How to Handle Guzzle Exception #10

Closed dearteno closed 9 years ago

dearteno commented 9 years ago

i got Client error response [status code] 400 form API but can not handle he said

"Guzzle \ Http \ Exception \ ClientErrorResponseException Client error response [status code] 400 [reason phrase] Bad Request [url] "

how to handle RequestException and ClientException .

teepluss commented 9 years ago
try {
 //
} catch (Guzzle\Http\Exception\ClientErrorResponseException $e) { 
 //
}