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

Improve error messages #103

Open
Anviking opened this issue Jul 10, 2016 · 1 comment
Open

Improve error messages #103

Anviking opened this issue Jul 10, 2016 · 1 comment

Comments

@Anviking
Copy link
Owner

  • lazy
  • fast
  • lots of stuff
  • display the important stuff
  • automatic

We could retrieve type information in each => overload / equivalent
Large dictionaries/arrays could be stripped down to show only a few bordering items for the description representation.

@Anviking Anviking added this to the v1.0 milestone Jul 10, 2016
@Anviking Anviking removed this from the v0.5 milestone Aug 5, 2016
@Anviking
Copy link
Owner Author

More concrete first steps:

  • Store references to each dictionary inside the Error, not just the path
  • Create custom string representations using this

Personally I think some kind of tweaked yaml style format would be useful showing:

  • The keys leading to the error
  • Either:
    • The object whose key is missing
    • The key that is missing
    • The object whose key is missing

For example | could indicate an error:

source: 
|        id: 163986909
|        actor: 
|        |     organizations_url: https://api.github.com/users/Anviking/orgs
|        |     repos_url: https://api.github.com/users/Anviking/repos
|        |     html_url: https://github.com/Anviking
|        |     site_admin: 0
|        |     gravatar_id: 
|        |     starred_url: https://api.github.com/users/Anviking/starred{/owner}{/repo}
|        |     avatar_url: https://avatars.githubusercontent.com/u/304423?v=3
|        |     type: User
|        |     gists_url: https://api.github.com/users/Anviking/gists{/gist_id}
|        |    |login: 42 <---- Type mismatch - expected String, not Int.
|        |     followers_url: https://api.github.com/users/Anviking/followers
|        |     id: 304423
|        |     subscriptions_url: https://api.github.com/users/Anviking/subscriptions
|        |     following_url: https://api.github.com/users/Anviking/following{/other_user}
|        |     received_events_url: https://api.github.com/users/Anviking/received_events
|        |     events_url: https://api.github.com/users/Anviking/events{/privacy}
|        |     url: https://api.github.com/users/Anviking
other stuff with no errors
        foo
        bar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant