Add error handler middleware

This commit is contained in:
Howl
2016-04-07 11:38:57 +02:00
parent af71442e79
commit ae743cb395
2 changed files with 22 additions and 1 deletions

View File

@@ -12,7 +12,7 @@ import (
// Start begins taking HTTP connections.
func Start(conf common.Conf, db *sql.DB) {
r := gin.Default()
r.Use(gzip.Gzip(gzip.DefaultCompression))
r.Use(gzip.Gzip(gzip.DefaultCompression), ErrorHandler())
api := r.Group("/api")
{