diff --git a/util/error.go b/util/error.go
index <HASH>..<HASH> 100644
--- a/util/error.go
+++ b/util/error.go
@@ -176,7 +176,12 @@ func ErrorWithCauseChain(err error) string {
 			break
 		}
 	}
-	buffer.WriteString(err.Error())
+
+	if err != nil {
+		buffer.WriteString(err.Error())
+	} else {
+		buffer.WriteString("<err=nil>")
+	}
 
 	return buffer.String()
 }
diff --git a/util/error_test.go b/util/error_test.go
index <HASH>..<HASH> 100644
--- a/util/error_test.go
+++ b/util/error_test.go
@@ -23,6 +23,8 @@ caused by AssertionError: err2
 caused by err3`
 
 	assert.Equal(t, expected, ErrorWithCauseChain(err))
+
+	assert.Equal(t, "<err=nil>", ErrorWithCauseChain(nil))
 }
 
 func TestCombineErrors(t *testing.T) {
Fixed a potential NPE when printing error cause chains.