mirror of
https://codeberg.org/shroff/phylum.git
synced 2026-05-02 10:09:58 -05:00
Fix api error handling
This commit is contained in:
@@ -22,7 +22,7 @@ func Setup(r *gin.RouterGroup, a *app.App) {
|
||||
func handleApiError(c *gin.Context) {
|
||||
defer func() {
|
||||
if err := recover(); err != nil {
|
||||
if e, ok := err.(errors.Err); ok {
|
||||
if e, ok := err.(*errors.Err); ok {
|
||||
c.AbortWithStatusJSON(e.Status, e)
|
||||
} else {
|
||||
panic(err)
|
||||
|
||||
Reference in New Issue
Block a user