Fix error printing caused panic

This commit is contained in:
bytedream 2022-06-19 01:42:57 +02:00
parent 8ddb436fac
commit aa088cb318

View file

@ -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)
}