ApiException in ApiClient.php line 315: [400] Error connecting to the API (https://api-sandbox.dwolla.com/customers)

Hi @shreyas.p,

You should be able to catch the error and get the JSON response-body. You can try wrapping the request in a try/catch and display the error response by calling the getResponseBody() method.

Example:

try{
    $new_customer = $customersApi->create([
        //request_body   
    ]);
} catch (Exception $e) {
    echo 'Caught exception: ',  $e->getResponseBody(), "\n";
}
1 Like