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

Add to the Kitura-router the ability to add error handlers #15

Closed
dfirsht opened this issue Feb 8, 2016 · 5 comments
Closed

Add to the Kitura-router the ability to add error handlers #15

dfirsht opened this issue Feb 8, 2016 · 5 comments
Assignees
Milestone

Comments

@dfirsht
Copy link
Contributor

dfirsht commented Feb 8, 2016

Add to the Kitura router the ability to add error handlers which can be invoked when a handler or middleware indicates that it encountered an error. This error handler could be the part of a server application that creates and returns the error page.

@dfirsht dfirsht modified the milestones: 0.3, 0.4 Feb 8, 2016
@shmuelk shmuelk changed the title Add to the Phoenix router the ability to add error handlers Add to the Kitura-router the ability to add error handlers Feb 9, 2016
@dfirsht dfirsht modified the milestones: 0.5, 0.4 Feb 11, 2016
@dfirsht dfirsht modified the milestones: 0.5, Product Backlog Feb 22, 2016
@dfirsht dfirsht self-assigned this Feb 29, 2016
@dfirsht
Copy link
Contributor Author

dfirsht commented Feb 29, 2016

The error handler is going to be inspired by express:

However we would like it to be a separate function with a use like router.error(). The library will pass any errors to these entities in the order they were written.

dfirsht added a commit that referenced this issue Mar 1, 2016
@dfirsht
Copy link
Contributor Author

dfirsht commented Mar 1, 2016

Once validated the router error-handling branch needs to be merged into develop and tagged. Then Package.swift needs to be updated in the Kitura error-handling branch and afterwards, merged into develop.

@rolivieri
Copy link
Contributor

Assigning to me for validation.

@rolivieri rolivieri assigned rolivieri and unassigned dfirsht Mar 2, 2016
@rolivieri
Copy link
Contributor

@dfirsht Looks good! Can you double check that line 331 in Sources/KituraRouter/Router.swift is using the logger instead of the print statement?

print(self.routeElems[elemIndex].method)

Other than that, I think you can merge.

dfirsht added a commit that referenced this issue Mar 2, 2016
@dfirsht
Copy link
Contributor Author

dfirsht commented Mar 2, 2016

Confirmed, merged both branches into develop.

@dfirsht dfirsht closed this as completed Mar 2, 2016
dfirsht added a commit to Kitura/Kitura-Sample that referenced this issue Mar 9, 2016
dfirsht added a commit to Kitura/Kitura-Sample that referenced this issue Mar 9, 2016
dfirsht added a commit that referenced this issue Mar 9, 2016
dfirsht added a commit that referenced this issue Mar 9, 2016
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

No branches or pull requests

2 participants