When attempting to get the data from a connector's request, we can use ->json() which will return null if it fails/nothing is available. However if we use ->object() it will throw an exception on error.
Shouldn't the object() method also follow the same expectation as json()? I would expect a null/empty array response instead of an exception.
Secondly any reason we cannot provide a key/default in the object like we do with json() and array()?
If this is something that the maintainer feels is necessary. I can put in a PR for it.
When attempting to get the data from a connector's request, we can use
->json()
which will return null if it fails/nothing is available. However if we use->object()
it will throw an exception on error.Shouldn't the
object()
method also follow the same expectation asjson()
? I would expect a null/empty array response instead of an exception.Secondly any reason we cannot provide a key/default in the object like we do with
json()
andarray()
?If this is something that the maintainer feels is necessary. I can put in a PR for it.