This will throw an exception. I didn't expect an exception, as the getMessage description is: Information about current request. So it seems its not tied to a error response.
I'm not sure if this is a problem with the response of the test env, or if the code could use an update. when its the code, I would like to suggest two options:
Change return value to ?string
Update method description to describe in which case a message will be available.
If you appreciate it, I can make a PR for this, but I would like to discuss this first.
When requesting a certificate the test env returns this data:
The method
getMessage
on theXolphin\Responses\Request
class is inhereted fromXolphin\Responses\Base
. In this example the message isnull
, but thegetMessage
method has astring
as return value defined, see: https://github.com/xolphin/xolphin-api-php/blob/d8610720f80948ab4fb3f1f0310782dfe823155f/src/Responses/Base.php#L76This will throw an exception. I didn't expect an exception, as the
getMessage
description is:Information about current request
. So it seems its not tied to a error response.I'm not sure if this is a problem with the response of the test env, or if the code could use an update. when its the code, I would like to suggest two options:
?string
If you appreciate it, I can make a PR for this, but I would like to discuss this first.