Skip to main content

Error Model Deserialization Issue Fixed

· One min read

A bug in PHP SDKs being generated lead to custom Error Exception Models not being deserialized properly from the response when an API error occurred. This was caused by an error in the unbox() function in the custom Exception class. It has now been fixed.

If you were using custom Error Exceptions, then please re-generate your PHP SDKs to get the fix.


The new code for unboxing response in custom Exception models looks like this:

public function unbox()
APIHelper::deserialize(self::getResponseBody(), $this, false, false);

Instead of the custom mapping logic, we use APIHelper::deserialize helper to deserialize the response correctly.