Code cleanup and missing error checks

This commit is contained in:
Philipp Wolfer 2023-12-10 13:51:38 +01:00
parent 6eaef18188
commit c4193f42a1
No known key found for this signature in database
GPG key ID: 8FDF744D4919943B
7 changed files with 23 additions and 19 deletions

View file

@ -79,7 +79,10 @@ func listRequest[T Result](c Client, path string, offset int, limit int) (result
"limit": strconv.Itoa(limit),
}).
SetResult(&result)
c.setToken(request)
err = c.setToken(request)
if err != nil {
return
}
response, err := request.Get(path)
if response.StatusCode() != 200 {