hackage-security icon indicating copy to clipboard operation
hackage-security copied to clipboard

Better error message when deserializing bad root.json

Open brandon-leapyear opened this issue 4 years ago • 0 comments

We're trying to configure stack to use a private Hackage instance, and we kept seeing the message:

Could not deserialize <repo>/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

{
  "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

brandon-leapyear avatar Mar 24 '21 22:03 brandon-leapyear