aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--modules/context/context.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/context/context.go b/modules/context/context.go
index 6aeeb9e694..8e50e154a1 100644
--- a/modules/context/context.go
+++ b/modules/context/context.go
@@ -269,7 +269,7 @@ func (ctx *Context) ServerError(logMsg string, logErr error) {
func (ctx *Context) serverErrorInternal(logMsg string, logErr error) {
if logErr != nil {
log.ErrorWithSkip(2, "%s: %v", logMsg, logErr)
- if errors.Is(logErr, &net.OpError{}) {
+ if _, ok := logErr.(*net.OpError); ok || errors.Is(logErr, &net.OpError{}) {
// This is an error within the underlying connection
// and further rendering will not work so just return
return