Skip to content

Commit 8f03253

Browse files
authored
fix(rdb): fix nil DownloadURL lookup in backup (#3952)
1 parent d8b9f04 commit 8f03253

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

internal/namespaces/rdb/v1/custom_backup.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,7 @@ func backupDownloadCommand() *core.Command {
288288
Timeout: scw.TimeDurationPtr(backupActionTimeout),
289289
RetryInterval: core.DefaultRetryInterval,
290290
}
291+
291292
backup, err := api.WaitForDatabaseBackup(backupRequest)
292293
if err != nil {
293294
return nil, err
@@ -320,6 +321,11 @@ func backupDownloadCommand() *core.Command {
320321
}
321322

322323
httpClient := core.ExtractHTTPClient(ctx)
324+
325+
if backup.DownloadURL == nil {
326+
return nil, fmt.Errorf("download URL is still nil after export")
327+
}
328+
323329
res, err := httpClient.Get(*backup.DownloadURL)
324330
if err != nil {
325331
return nil, err

0 commit comments

Comments
 (0)