diff --git a/color.go b/color.go index 09f65c7..accb926 100644 --- a/color.go +++ b/color.go @@ -209,6 +209,10 @@ func (c *Client) ValidateColor(color Color) (Color, error) { defer resp.Body.Close() + if resp.IsError() { + return nil, resp.GetLifxError() + } + if err = json.NewDecoder(resp.Body).Decode(&s); err != nil { return nil, err }