The situation:
In docusign-php-client v4.0.0, ApiException#getResponseObject() stopped returning a deserialized ErrorDetails object and instead returned a serialized PHP object as a string, breaking error handling that worked in v3.0.1. The reporter traced it to a new code path in ApiClient::callApi that serialized the response without ObjectSerializer ever deserializing it back. The change was not listed in the breaking changes notes.
What actually fixes it (verified in the thread):
Upgrade to v5.5, where the maintainer fixed it: composer require docusign/esign-client:^5.5 (the fix was first available in the 5.5.0-RC). The DocuSign team confirmed the fix on the issue before closing it. Source: https://github.com/docusign/docusign-esign-php-client/issues/83