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

Better log message instead: Failed to parse config (/home/noisy/.wise/config.yml) as JSON: #29

Open
noisy opened this issue Dec 10, 2018 · 0 comments
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed well defined If you want to contribute, take task like this

Comments

@noisy
Copy link
Contributor

noisy commented Dec 10, 2018

The problem

From a perspective of a user:

steem-wise-cli | Failed to parse config (/home/noisy/.wise/config.yml) as JSON:

...looks like a bug, despite the fact that this is expected behavior and a fallback to YML format. We should display more user friendly message.

steem-wise-cli | Failed to parse config (/home/noisy/.wise/config.yml) as JSON: Unexpected token u in JSON at position 0

I did

wise --debug download-rules -a lenka ./lenka.yml

I expected to see

steem-wise-cli | Trying to read config from /home/noisy/.wise/config.json
steem-wise-cli | File config.json is not present, fallback to config.yml instead
steem-wise-cli | Trying to read config from /home/noisy/.wise/config.yml
steem-wise-cli | Successfully parsed /home/noisy/.wise/config.yml as YAML

Instead, I saw:

steem-wise-cli | Trying to read config from /home/noisy/.wise/config.yml
steem-wise-cli | Failed to parse config (/home/noisy/.wise/config.yml) as JSON: Unexpected token u in JSON at position 0
steem-wise-cli | Successfully parsed /home/noisy/.wise/config.yml as YAML

Version of steem-wise-core: 3.0.6-rc1

Version of nodejs: 10.0.5

@noisy noisy added bug Something isn't working good first issue Good for newcomers labels Dec 10, 2018
@Jblew Jblew self-assigned this Dec 11, 2018
@noisy noisy unassigned Jblew Dec 14, 2018
@noisy noisy added the well defined If you want to contribute, take task like this label Dec 14, 2018
@noisy noisy added the help wanted Extra attention is needed label Jan 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed well defined If you want to contribute, take task like this
Projects
None yet
Development

No branches or pull requests

2 participants