haskell / haskell/hackage-security

Better error message when deserializing bad root.json

Open
#251 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Haskell
Stars
63
Forks
56
PR merge metrics
No merged PRs in 30d

Description

We're trying to configure `stack` to use a private Hackage instance, and we kept seeing the message:
```
Could not deserialize /root.json: Schema error: Expected field "signed"
```
Adding `trace` statements and building `stack` manually, we were able to find out that it was attempting to parse
```json
{
"errors": [
{
"status": 401,
"message": "Authentication is required"
}
]
}
```
It would be nice if the message could show, in some way, the JSON file that failed to be parsed

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.