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.
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— thedecodeJsoncalls that expect arrays should check for error objects first and extract themessagefield.