fix: date time and improve erorrs (#22)

This commit is contained in:
Ludvig Lundgren 2021-08-30 22:11:59 +02:00 committed by GitHub
parent c372ca4ddf
commit d4aa2027c0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 84 additions and 73 deletions

View file

@ -74,7 +74,7 @@ func (c *client) post(endpoint string, data interface{}) (*http.Response, error)
return nil, errors.New("unauthorized: bad credentials")
} else if res.StatusCode != http.StatusOK {
log.Error().Err(err).Msgf("sonarr client request error: %v", reqUrl)
return nil, nil
return nil, errors.New("sonarr: bad request")
}
// return raw response and let the caller handle json unmarshal of body