Skip to content

Commit

Permalink
Handle request errors during raft snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
sgmiller committed Apr 27, 2020
1 parent 03332aa commit ce0228d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions api/sys_raft.go
Expand Up @@ -92,6 +92,11 @@ func (c *Sys) RaftSnapshot(snapWriter io.Writer) error {
// to determine if the body contains error message.
var result *Response
resp, err := c.c.config.HttpClient.Do(req)

if err != nil {
return err
}

if resp == nil {
return nil
}
Expand Down

0 comments on commit ce0228d

Please sign in to comment.