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

Handler Errors #127

Closed
wants to merge 2 commits into from
Closed

Handler Errors #127

wants to merge 2 commits into from

Conversation

1995parham
Copy link

Based on #126, I have added the error to the handler syntax, but it has empty logic for handling errors.

@welcome
Copy link

welcome bot commented Feb 12, 2020

Thanks for opening this pull request! 🎉 Please check out our contributing guidelines.

@@ -176,7 +176,9 @@ func (app *Application) handler(fctx *fasthttp.RequestCtx) {
// Set route pointer if user wants to call .Route()
ctx.route = route
// Execute handler with context
route.Handler(ctx)
if err := route.Handler(ctx); err != nil {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SA9003: empty branch (from staticcheck)

@@ -192,7 +194,9 @@ func (app *Application) handler(fctx *fasthttp.RequestCtx) {
if route.Midware && strings.HasPrefix(path, route.Path) {
found = true
ctx.route = route
route.Handler(ctx)
if err := route.Handler(ctx); err != nil {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SA9003: empty branch (from staticcheck)

@@ -227,7 +231,9 @@ func (app *Application) handler(fctx *fasthttp.RequestCtx) {
ctx.route = route

// Execute handler with context
route.Handler(ctx)
if err := route.Handler(ctx); err != nil {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SA9003: empty branch (from staticcheck)

@Fenny
Copy link
Member

Fenny commented Feb 12, 2020

Thanks for your PR, but we had a different API in mind see #128

@Fenny Fenny closed this Feb 12, 2020
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

3 participants