From aa088cb318afd60deed167356a2d8938cacccad9 Mon Sep 17 00:00:00 2001 From: bytedream Date: Sun, 19 Jun 2022 01:42:57 +0200 Subject: [PATCH] Fix error printing caused panic --- error.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/error.go b/error.go index b4f7329..9bc2ae6 100644 --- a/error.go +++ b/error.go @@ -12,6 +12,6 @@ type RequestError struct { Message string } -func (re *RequestError) String() string { +func (re *RequestError) Error() string { return fmt.Sprintf("error for endpoint %s (%d): %s", re.Response.Request.URL.String(), re.Response.StatusCode, re.Message) }