diff --git a/authentication/context.go b/authentication/context.go index 6247865..22e596a 100644 --- a/authentication/context.go +++ b/authentication/context.go @@ -14,6 +14,7 @@ func GetApplication(ctx *gin.Context) *model.Application { app, ok := ctx.MustGet("app").(*model.Application) if app == nil || !ok { ctx.AbortWithError(http.StatusInternalServerError, errors.New("an error occured while retrieving application from context")) + return nil } return app