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

Export CodeAndMessage function for general use #5

Merged
merged 1 commit into from
Nov 9, 2017
Merged

Conversation

flimzy
Copy link
Contributor

@flimzy flimzy commented Nov 9, 2017

Or maybe this function should live somewhere else entirely? Sharing utility functions from within a middleware package seems a bit backwards in a way...

@codecov
Copy link

codecov bot commented Nov 9, 2017

Codecov Report

Merging #5 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff           @@
##           master      #5   +/-   ##
======================================
  Coverage    90.8%   90.8%           
======================================
  Files           3       3           
  Lines          87      87           
======================================
  Hits           79      79           
  Misses          5       5           
  Partials        3       3
Impacted Files Coverage Δ
httperrMiddleware/error.go 87.23% <100%> (ø) ⬆️

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 a4fb064...f430289. Read the comment docs.

@flimzy
Copy link
Contributor Author

flimzy commented Nov 9, 2017

Perhaps this functionality could/should live in the httperr package? Perhaps (at least partly) in the form of extended functionality of httperr.StatusCode? That function could be made to understand echo errors. But that would, I believe, mean that Desk could no longer use the same version of httperr as other projects, until Desk is on Echo 3.

Other suggestions?

@arp242
Copy link
Contributor

arp242 commented Nov 9, 2017

We actually made the same change in Desk last week. I think it's fine for now if it solves an immediate problem; don't need to overthink it. Can always change it later.

@flimzy flimzy merged commit 91d5d55 into master Nov 9, 2017
@flimzy flimzy deleted the exportStatusCode branch November 9, 2017 10:42
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