Skip to content
This repository has been archived by the owner on Jul 6, 2024. It is now read-only.

OnError hook is not working. #18

Open
ansarizafar opened this issue Dec 20, 2019 · 2 comments
Open

OnError hook is not working. #18

ansarizafar opened this issue Dec 20, 2019 · 2 comments

Comments

@ansarizafar
Copy link

I am returning an error from my route handler like this

return errors.New("Request interrupted by the client")

and I have registered a callback like this

app.OnError(func(ctx aero.Context, err error) {
		fmt.Printf("An Error occured.")
	         ctx.String(err.Error())
	})

but If I visit the route, The connection is closed without sending error message and no error message is printed in the console. It seems OnError callback is not working. Am I missing something?

@akyoto akyoto added the bug label Dec 21, 2019
@akyoto
Copy link
Member

akyoto commented Dec 21, 2019

Hi, thank you for the report. I'll try to look at it as soon as possible but please understand that I'm super busy with Christmas and new year being so close. Nonetheless, thank you for the report 👍

@ansarizafar
Copy link
Author

It's not urgent. Thanks for creating amazing Aero. Happy Christmas and Happy new year.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

2 participants