TUN-5255: Fix potential panic if Cloudflare API fails to respond to GetTunnel(id) during delete command

This commit is contained in:
Nuno Diegues 2021-10-14 14:50:07 +01:00
parent 76ade67f95
commit 6cbf90883d
1 changed files with 1 additions and 1 deletions

View File

@ -230,7 +230,7 @@ func (sc *subcommandContext) delete(tunnelIDs []uuid.UUID) error {
for _, id := range tunnelIDs {
tunnel, err := client.GetTunnel(id)
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