Skip to content

Add status code to error handler to be able to send other kind #35

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

Closed
wants to merge 2 commits into from
Closed

Add status code to error handler to be able to send other kind #35

wants to merge 2 commits into from

Conversation

ethervoid
Copy link

Now the current error handler only sends 500 error but I think is great to be able to customize the status code you want to send.

I've tried to create my own handler but I have to create a closure and control outside of Echo. This is an small change that could be very beneficial.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 91.19% when pulling 5888bc1 on ethervoid:add_code_errorhandler into e3dc3c3 on labstack:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.56%) to 90.63% when pulling 836fdf9 on ethervoid:add_code_errorhandler into e3dc3c3 on labstack:master.

@vishr
Copy link
Member

vishr commented Apr 24, 2015

It's a good point but I would prefer to change the default functions to also accept status code. Let me know your thoughts.

@ethervoid
Copy link
Author

That was my first approach I create two methods trying to not break
backward compatibility.

My opinion is that the error method should have error code parameter
El 24/4/2015 20:44, "Vishal Rana" notifications@github.com escribió:

It's a good point. I plan to to change the default functions to also
accept status code. Let me know your thoughts.


Reply to this email directly or view it on GitHub
#35 (comment).

@vishr vishr closed this in eee38a6 Apr 24, 2015
@ethervoid
Copy link
Author

Merged this way I don't appear as contributor 😢

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.

3 participants