Describe the bug
An array is returned instead of the expected object:
TypeError: Return value of JustSteveKing\Laravel\Envoyer\SDK\Resources\EnvoyerResource::save() must be an object or null, array returned in /Users/username/Sites/project/vendor/juststeveking/laravel-envoyer-sdk/src/Resources/EnvoyerResource.php:50
This happens when the API returns an error, To reproduce it all you have to do is send some invalid data :). I'm not sure why though, because json_decode should return an object like it is in the code.
Describe the bug An array is returned instead of the expected object:
TypeError: Return value of JustSteveKing\Laravel\Envoyer\SDK\Resources\EnvoyerResource::save() must be an object or null, array returned in /Users/username/Sites/project/vendor/juststeveking/laravel-envoyer-sdk/src/Resources/EnvoyerResource.php:50
This happens when the API returns an error, To reproduce it all you have to do is send some invalid data :). I'm not sure why though, because
json_decode
should return an object like it is in the code.