Skip to content

[BUG] Undefined array key \"cause\" in /vendor/onfleet/php-onfleet/src/Methods.php:164 #20

Description

@borgianvme

Describe the bug
When the OnFleet API returns an error response they don't always send a 'cause' key in the response which causes the package to throw an exception

To Reproduce
Just try to 'get' a task with an ID that is not on OnFleet(deleted task)
$this->client->tasks->get('example-id')

Expected behavior
Check if the cause exists before trying to set it here

Screenshots

Image

Additional context
N/A

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions