Skip to content

Commit

Permalink
Make error 190 hint towards Too Many Requests reached
Browse files Browse the repository at this point in the history
  • Loading branch information
AlbinOS authored Dec 29, 2023
1 parent 8637ff3 commit 2c8a1f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion device.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ func (svc *DeviceService) List(ctx context.Context) ([]Device, []InfraredDevice,
}

if response.StatusCode == 190 {
return nil, nil, errors.New("device internal error due to device states not synchronized with server")
return nil, nil, errors.New("device internal error due to device states not synchronized with server or too many requests limit reached")
} else if response.StatusCode != 100 {
return nil, nil, fmt.Errorf("unknown error %d from device list API", response.StatusCode)
}
Expand Down

1 comment on commit 2c8a1f2

@AlbinOS
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding specific on possible error

Please sign in to comment.