Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Supplying a string when expecting a boolean error is not readable #10

Open
sebbalex opened this issue Jun 5, 2020 · 1 comment
Open
Assignees
Labels
bug Something isn't working

Comments

@sebbalex
Copy link
Member

sebbalex commented Jun 5, 2020

When a malformed values is supplied where a boolean is expecting Parser is returning a wrong and misleading error such as

[
  {"Key":"Unexpected string key: it/conforme/gdpr"},
  {"Key":"Unexpected string key: it/conforme/misureMinimeSicurezza"}
]

I expect something more readable and make keys identifiable such as:

[
  {"Key": "it/conforme/gdpr", "Reason":"Unexpected string key: it/conforme/gdpr"},
  {"Key": "it/conforme/misureMinimeSicurezza", "Reason":"Unexpected string key: it/conforme/misureMinimeSicurezza"}
]

See italia/publiccode-editor#87 for details.

@bfabio
Copy link
Member

bfabio commented Dec 17, 2020

@sebbalex I think this can be closed after italia/publiccode-parser-go#77, wdyt?

The current format in production is italia/publiccode-editor#87 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants