Skip to content

Commit

Permalink
fix invalid memory address in backup
Browse files Browse the repository at this point in the history
  • Loading branch information
jremy42 committed Jul 3, 2024
1 parent b3b7803 commit 1d6b392
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions internal/namespaces/rdb/v1/custom_backup.go
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@ func backupDownloadCommand() *core.Command {
Timeout: scw.TimeDurationPtr(backupActionTimeout),
RetryInterval: core.DefaultRetryInterval,
}

backup, err := api.WaitForDatabaseBackup(backupRequest)
if err != nil {
return nil, err
Expand Down Expand Up @@ -320,6 +321,11 @@ func backupDownloadCommand() *core.Command {
}

httpClient := core.ExtractHTTPClient(ctx)

if backup.DownloadURL == nil {
return nil, fmt.Errorf("Download URL is still nil after export")
}

res, err := httpClient.Get(*backup.DownloadURL)
if err != nil {
return nil, err
Expand Down

0 comments on commit 1d6b392

Please sign in to comment.