Skip to content

Commit

Permalink
Adding better error message (#1151)
Browse files Browse the repository at this point in the history
* adding better error message

* better messaging
  • Loading branch information
bathina2 committed Dec 3, 2021
1 parent 0b02f24 commit 60bbe03
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkg/blockstorage/awsefs/wait.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,10 @@ func (e *efs) waitUntilRestoreComplete(ctx context.Context, restoreJobID string)
switch *resp.Status {
case backup.RestoreJobStatusCompleted:
return true, nil
case backup.RestoreJobStatusAborted, backup.RestoreJobStatusFailed:
return false, errors.New("Restore job is not completed successfully")
case backup.RestoreJobStatusAborted:
return false, errors.Errorf("Restore job aborted (%s)\n", resp.String())
case backup.RestoreJobStatusFailed:
return false, errors.Errorf("Restore job failed (%s)\n", resp.String())
default:
return false, nil
}
Expand Down

0 comments on commit 60bbe03

Please sign in to comment.