fix nil dereference
Some checks are pending
ci/woodpecker/push/main Pipeline is pending

This commit is contained in:
Tobias Trabelsi 2024-06-04 22:01:24 +02:00
parent c392bfe7eb
commit 69d6147582
Signed by: lerentis
GPG Key ID: FF0C2839718CAF2E

View File

@ -29,7 +29,7 @@ func QueueInfo(cfg *config.Config, target interface{}) error {
defer resp.Body.Close()
if resp.StatusCode != 200 {
return errors.New(fmt.Sprintf("Error from queue info api: %s", err.Error()))
return errors.New(fmt.Sprintf("Error from queue info api: %s", resp.Status))
}
return json.NewDecoder(resp.Body).Decode(target)