From 68f8ab24bd97bf7e830a3991b8481ab1401ab060 Mon Sep 17 00:00:00 2001 From: Krombel Date: Mon, 6 Aug 2018 16:54:16 +0200 Subject: [PATCH] make MatrixError implement error interface --- .../matrix-org/dendrite/clientapi/jsonerror/jsonerror.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/github.com/matrix-org/dendrite/clientapi/jsonerror/jsonerror.go b/src/github.com/matrix-org/dendrite/clientapi/jsonerror/jsonerror.go index 87b0b8ac2..fa15d9d8e 100644 --- a/src/github.com/matrix-org/dendrite/clientapi/jsonerror/jsonerror.go +++ b/src/github.com/matrix-org/dendrite/clientapi/jsonerror/jsonerror.go @@ -28,7 +28,7 @@ type MatrixError struct { Err string `json:"error"` } -func (e *MatrixError) Error() string { +func (e MatrixError) Error() string { return fmt.Sprintf("%s: %s", e.ErrCode, e.Err) }