TUN-5255: Fix potential panic if Cloudflare API fails to respond to GetTunnel(id) during delete command
This commit is contained in:
parent
76ade67f95
commit
6cbf90883d
|
@ -230,7 +230,7 @@ func (sc *subcommandContext) delete(tunnelIDs []uuid.UUID) error {
|
||||||
for _, id := range tunnelIDs {
|
for _, id := range tunnelIDs {
|
||||||
tunnel, err := client.GetTunnel(id)
|
tunnel, err := client.GetTunnel(id)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return errors.Wrapf(err, "Can't get tunnel information. Please check tunnel id: %s", tunnel.ID)
|
return errors.Wrapf(err, "Can't get tunnel information. Please check tunnel id: %s", id)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if tunnel DeletedAt field has already been set
|
// Check if tunnel DeletedAt field has already been set
|
||||||
|
|
Loading…
Reference in New Issue