Don't expose errors
This commit is contained in:
parent
e39d73f2da
commit
941c033323
@ -27,4 +27,10 @@ func ErrorHandler(c *gin.Context) {
|
|||||||
Error: message,
|
Error: message,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if c.Writer.Status() >= 500 && len(c.Errors) == 0 {
|
||||||
|
c.JSON(-1, ErrorResponse{
|
||||||
|
Error: "An internal server error occurred",
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user