Skip to content

utrack/gin-merry

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

forthebadge

gin-merry GoDoc

Middleware that marries merry errors and Gin.

It pretty-prints merry errors to the user with all the context embedded in the error.

This middleware is compatible with Golang's Gin HTTP router and merry errors with context™.

After enabling the middleware, if the handler returns an error to the gin.Context, it will be printed to the user with all the additional context that came with the error. The errors' queue is cleared, so the logs won't be cluttered with the useless errors.

However, if the error has code 500 - then the error is considered bad/not merry at all; some default text is printed to the user and the error is passed down the chain for logging.

About

Middleware that marries merry errors and Gin.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages