Skip to content

Commit 1c9fdd1

Browse files
authored
Merge pull request #1188 from ioito/hotfix/qx-avoid-panic-0226
fix(cephfs): avoid panic
2 parents a44ec88 + aee43fe commit 1c9fdd1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pkg/multicloud/cephfs/client.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,9 @@ func (cli *SCephFSClient) auth() error {
141141
if err != nil {
142142
return errors.Wrapf(err, "auth")
143143
}
144+
if gotypes.IsNil(resp) {
145+
return fmt.Errorf("empty response")
146+
}
144147
cli.token, err = resp.GetString("token")
145148
return err
146149
}

0 commit comments

Comments
 (0)