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

Fixed error reassignment #1006

Closed
wants to merge 1 commit into from
Closed

Fixed error reassignment #1006

wants to merge 1 commit into from

Conversation

asardak
Copy link

@asardak asardak commented Sep 8, 2017

Hello! I have noticed that DefaultHTTPErrorHandler always logs "message":"<nil>" for every error:

{"time":"2017-09-08T09:25:46.390299469Z","level":"ERROR","prefix":"echo","file":"api.go","line":"67","message":"<nil>"}

This PR fix it by shadowing original err variable in conditional block.

@codecov
Copy link

codecov bot commented Sep 8, 2017

Codecov Report

Merging #1006 into master will increase coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1006      +/-   ##
==========================================
+ Coverage   76.52%   76.53%   +0.01%     
==========================================
  Files          26       26              
  Lines        2224     2225       +1     
==========================================
+ Hits         1702     1703       +1     
  Misses        400      400              
  Partials      122      122
Impacted Files Coverage Δ
echo.go 85.62% <100%> (+0.04%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f2bc680...cef21a8. Read the comment docs.

@vishr vishr closed this in 1678da5 Sep 8, 2017
@vishr
Copy link
Member

vishr commented Sep 8, 2017

@asardak Thanks for your contribution, I got it covered in a different commit.

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

2 participants