You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
Braunson
changed the title
Connector object() throws an exception but json returns null|array?
Connector object() throws an exception but json returns null|object?
May 22, 2024
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.
The text was updated successfully, but these errors were encountered: