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

Webmachine/Cowboy error pretty-printing #110

Merged
merged 3 commits into from Mar 14, 2013
Merged

Webmachine/Cowboy error pretty-printing #110

merged 3 commits into from Mar 14, 2013

Conversation

Vagabond
Copy link
Member

Webmachine errors go from:

2013-02-27 22:03:25.813 [error] <0.15064.1391> webmachine error:
                     path="/buckets
{error,{error,{badmatch,{error,timeout}},[{riak_kv_wm_buckets,produce_bucket_list,2,[{file,"src/riak_kv_wm_buckets.erl"},{line,123}]},{webmachine_resource,resource_call,3,[{file,"src/webmachine_resource.erl"},{line,169}]},{webmachine_resource,do,3,[{file,"src/webmachine_resource.erl"},{line,128}]},{webmachine_decision_core,resource_call,1,[{file,"src/webmachine_decision_core.erl"},{line,48}]},{webmachine_decision_core,decision,1,[{file,"src

To:

23:42:51.632 [error] Webmachine error at path "/buckets" : no match of right hand value {error,timeout} in riak_kv_wm_buckets:produce_bucket_list/2 line 123

There's also similar rewriting done for cowboy 0.8+ errors.

@ghost ghost assigned Vagabond Feb 28, 2013
@seancribbs
Copy link

Can't comment on the code, but this is a freaking awesome idea.

@mworrell
Copy link
Contributor

mworrell commented Mar 7, 2013

I think that you shouldn't loose your back trace.
There is useful information in there, like the resource handling the request, and where in the resource the call originated.

@Vagabond
Copy link
Member Author

Vagabond commented Mar 7, 2013

It isn't lost, it is written to the crash.log if you need more debugging information than what was provided in the 'short' form.

@mworrell
Copy link
Contributor

mworrell commented Mar 7, 2013

Thanks for the clarification. In that case the short form is very welcome.

@ghost ghost assigned macshonle Mar 14, 2013
@macshonle
Copy link

+1

@macshonle
Copy link

Re +1, the new tests

Vagabond added a commit that referenced this pull request Mar 14, 2013
Webmachine/Cowboy error pretty-printing
@Vagabond Vagabond merged commit 57cc2d5 into master Mar 14, 2013
@Vagabond Vagabond deleted the adt-http-errors branch March 14, 2013 04:27
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

Successfully merging this pull request may close these issues.

None yet

4 participants