Skip to content

[Bug]: Client > Update - Error 500 when we expect 401/404/422 #2

@tiagof

Description

@tiagof

What happened?

The endpoint refers to different Response codes, but we are getting 500 everytime. (Except for when our query is valid, then we get a 200)

This client exists:

        > InvoiceXpress::client()->update(37444085, ['client' => ['phone' => '123456']]);
        = null

This client does NOT exist. We expected a 404

        > InvoiceXpress::client()->update(27444085, ['client' => ['phone' => '123456']]);

        Illuminate\Http\Client\RequestException HTTP request returned status code 500:
        {"status":500,"error":"Internal Server Error"}.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions