Error message truncated

I get an error message in the callback field, but unfortunately I cannot get a reversed answer.

  • PHP 8.1
  • PHP-SDK 2.3.4
  • Laravel 10

My response:
"message": "[400] Client error: `POST https://api.shotstack.io/stage/render` resulted in a `400 Bad Request` response:\n{\"success\":true,\"message\":\"Bad Request\",\"response\":{\"error\":{\"name\":\"ValidationError\",\"details\":[{\"message\":\"\\\"callback\\ (truncated...)\n"

How are you handling your error messages? This topic delves into some issues other issues were having with truncated errors.

The below is from our demos on Github and should provide the full error message:

try {
    $response = $client->postRender($edit)->getResponse();
} catch (ApiException $e) {
    die('Request failed: ' . $e->getMessage() . $e->getResponseBody());
}