src/Helpers/HttpHelper.php
private function transformErrorToMessage($jsonDecodedObject)
    {
        if (property_exists($jsonDecodedObject,"error"))
        {
            $message = $jsonDecodedObject->error->message;
            if (!is_object($message))
            {
                return $message;
            }
            else
            {
                $messageArray = [];
                foreach ($message as $key => $value)
                {
                    array_push($messageArray,$value);
                }
                return implode(", ",$messageArray);
            }
        }
        return null;
    }
private function transformErrorToMessage($jsonDecodedObject)
    {
        if (property_exists($jsonDecodedObject,"error"))
        {
            $message = $jsonDecodedObject->error->message;
            if (!is_object($message))
            {
                return $message;
            }
            else
            {
                $messageArray = [];
                foreach ($message as $key => $value)
                {
                    array_push($messageArray,$value);
                }
                return implode(", ",$messageArray);
            }
        }
        return null;
    }
private function transformErrorToMessage ( $ jsonDecodedObject ) { if ( property_exists ( $ jsonDecodedObject , "error" ) ) { $ message = $ jsonDecodedObject -> error -> message ; if ( ! is_object ( $ message ) ) { return $ message ; } else { $ messageArray = [ ] ; foreach ( $ message as $ key => $ value ) { array_push ( $ messageArray , $ value ) ; } return implode ( ", " , $ messageArray ) ; } } return null ; }
Transform a JSON error response into a string message
@param $jsonDecodedObject
@return null|string
Transform a JSON error response into a string message