Skip to content

Errors failing to surface when deserializing json #63

@tvelich

Description

@tvelich

Client version

6.0.1

Expected behaviour

Errors throw/contain actual reason for request failure

Actual behaviour

Error complains about invalid json (even though content type is text/html): Unexpected end of JSON input at https://github.com/sendwithus/sendwithus_nodejs/blob/master/lib/sendwithus.js#L69

Steps to reproduce

To demonstrate with a 403 just require('sendwithus')().send({}, (err) => console.log(err)) in a node console and it'll fail with this obscure error

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions