Open sharkodlak opened 1 year ago
Exception can be enhanced by passing causing exception as $previous when ApiException is created. Now it's impossible to get API response body from ApiException.
I'd like to get API response body from ApiException $e.
try { ... } catch (ApiException $e) (string) $e->getPrevious()->getResponse()->getBody(); }
It's impossible to call $e->getPrevious()->... because previous exception is't stored.
Thank you @sharkodlak for the valuable feedback. Let me check it and come back to you with more information.
Exception can be enhanced by passing causing exception as $previous when ApiException is created. Now it's impossible to get API response body from ApiException.
Expected Behavior
I'd like to get API response body from ApiException $e.
try { ... } catch (ApiException $e) (string) $e->getPrevious()->getResponse()->getBody(); }
Current Behavior
It's impossible to call $e->getPrevious()->... because previous exception is't stored.
Steps to Reproduce