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 cq_jcr error messages #57

Open
jwadolowski opened this issue Jan 11, 2018 · 0 comments
Open

Improve cq_jcr error messages #57

jwadolowski opened this issue Jan 11, 2018 · 0 comments

Comments

@jwadolowski
Copy link
Owner

Under certain circumstances cq_jcr can fail. Produced error messages are not always clear. Please improve error handling, i.e. include raw request & response to make debugging easier.

Example

[2018-01-11T11:35:48+01:00] INFO: Processing cq_jcr[Author: /content/dam/xxxxx/app_assets/yyyyy/jcr:content] action create (example-webapp::author_conf line 111)
[2018-01-11T11:35:48+01:00] FATAL: Unable to parse  as JSON: 743: unexpected token at ''
...
Error executing action `create` on resource 'cq_jcr[Author: /content/dam/xxxxx/app_assets/yyyyy/jcr:content]'

    SystemExit
    ----------
    exit
    
    Cookbook Trace:
    ---------------
    /var/chef/cache/cookbooks/cq/libraries/_http_helper.rb:40:in `rescue in json_to_hash'
    /var/chef/cache/cookbooks/cq/libraries/_http_helper.rb:36:in `json_to_hash'
    /var/chef/cache/cookbooks/cq/libraries/provider_cq_jcr.rb:150:in `node_info'
    /var/chef/cache/cookbooks/cq/libraries/provider_cq_jcr.rb:43:in `load_current_resource'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant