Skip to content

Commit b7534ee

Browse files
authored
Fix logic error causing panic storing nil (#15)
1 parent 4589547 commit b7534ee

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

client.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,8 +357,9 @@ func (c *Client) streamingPostDNClient(ctx context.Context, reqType string, valu
357357
}
358358
if err := json.Unmarshal(respBody, &errors); err != nil {
359359
sc.err.Store(fmt.Errorf("dnclient endpoint returned bad status code '%d', body: %s", resp.StatusCode, respBody))
360+
} else {
361+
sc.err.Store(errors.Errors.ToError())
360362
}
361-
sc.err.Store(errors.Errors.ToError())
362363
}
363364
}()
364365

0 commit comments

Comments
 (0)