Skip to content

fix: show meaningful error when GitHub API returns non-array response #93

@paolino

Description

@paolino

When the GitHub API returns an error object (e.g. bad credentials, rate limit exceeded), the dashboard shows a raw Argonaut decode error: (TypeMismatch "Array").

This happens because the REST fetch functions expect a JSON array but receive an error object like {"message": "Bad credentials"}. The decode fails and the raw type error bubbles up to the UI.

Expected: Show a human-readable message like "Invalid token" or "API error: Bad credentials".

Where: Lib/GitHub/Rest.purs — the decodeJson calls that expect arrays should check for error objects first and extract the message field.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions