From a1f09bafccb32ba1f137d242368310c7a142d028 Mon Sep 17 00:00:00 2001 From: William Petit Date: Mon, 27 Feb 2023 17:28:55 +0100 Subject: [PATCH] feat: simplify api error message --- api/api.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/api.go b/api/api.go index 7bea4d3..a82c51c 100644 --- a/api/api.go +++ b/api/api.go @@ -21,7 +21,7 @@ type Error struct { } func (e *Error) Error() string { - return fmt.Sprintf("%s: %v", e.Code, e.Data) + return fmt.Sprintf("api-error: %s", e.Code) } func DataResponse(w http.ResponseWriter, status int, data interface{}) {