public function getErrorMessage()
    {
        if (array_key_exists('error', $this->responseData?: [])) {
            if (is_string($this->responseData['error'])) {
                return json_encode($this->responseData['error']);
            } elseif(array_key_exists('error', $this->responseData['error'])) {
                return json_encode($this->responseData['error']['error']);
            } else {
                return json_encode($this->responseData['error']);
            }
        } else {
            return null;
        }
    }
public function getErrorMessage()
    {
        if (array_key_exists('error', $this->responseData?: [])) {
            if (is_string($this->responseData['error'])) {
                return json_encode($this->responseData['error']);
            } elseif(array_key_exists('error', $this->responseData['error'])) {
                return json_encode($this->responseData['error']['error']);
            } else {
                return json_encode($this->responseData['error']);
            }
        } else {
            return null;
        }
    }
public function getErrorMessage ( ) { if ( array_key_exists ( 'error' , $ this -> responseData ? : [ ] ) ) { if ( is_string ( $ this -> responseData [ 'error' ] ) ) { return json_encode ( $ this -> responseData [ 'error' ] ) ; } elseif ( array_key_exists ( 'error' , $ this -> responseData [ 'error' ] ) ) { return json_encode ( $ this -> responseData [ 'error' ] [ 'error' ] ) ; } else { return json_encode ( $ this -> responseData [ 'error' ] ) ; } } else { return null ; } }
Retrieves the error message from the response
@return null|string
Retrieves the error message from the response