Skip to content

Error format doesn't match the docs #127

@ntrepid8

Description

@ntrepid8

Sometimes when attempting to decode invalid JSON with the version 3.1 I see this sort of return value:

{:error, :invalid, 0}

The docs seem to indicate that the error tuples should be one of these:

{:error, :invalid}
{:error, {:invalid, String.t}}

I think this line is the culprit:

I think it was from this PR:

@devinus would you accept a PR to change the error tuple from this:

{:error, :invalid, 0}

to this?

{:error, {:invalid, 0}}

I would also update the docs to include this as a possible error tuple to indicate the position:

{:error, {:invalid, integer}}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions