summaryrefslogtreecommitdiffstats
path: root/modules/context
diff options
context:
space:
mode:
Diffstat (limited to 'modules/context')
-rw-r--r--modules/context/api.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/context/api.go b/modules/context/api.go
index fd9983c52b..4e189ce077 100644
--- a/modules/context/api.go
+++ b/modules/context/api.go
@@ -212,6 +212,11 @@ func (ctx *APIContext) NotFound(objs ...interface{}) {
var message = "Not Found"
var errors []string
for _, obj := range objs {
+ // Ignore nil
+ if obj == nil {
+ continue
+ }
+
if err, ok := obj.(error); ok {
errors = append(errors, err.Error())
} else {