onedrive: fall back to manual drive ID entry when drive listing fails
When both /me/drives and /me/drive fail during config (for example an account-level 403 serviceReadOnly "Database Is Read Only"), send the config state machine to the existing manual drive ID entry state instead of dead-ending at choose_type with the raw error. The drive itself remains usable when only the enumeration API is blocked. Fixes #9794
This commit is contained in:
committed by
Nick Craig-Wood
parent
4479a3b09b
commit
03fe2ef794
@@ -573,7 +573,7 @@ func chooseDrive(ctx context.Context, name string, m configmap.Mapper, srv *rest
|
||||
drives.Drives = append(drives.Drives, meDrive)
|
||||
}
|
||||
} else if drivesErr != nil {
|
||||
return fs.ConfigError("choose_type", fmt.Sprintf("Failed to query available drives: /me/drives: %v; /me/drive: %v", drivesErr, meDriveErr))
|
||||
return fs.ConfigError("driveid", fmt.Sprintf("Failed to query available drives: /me/drives: %v; /me/drive: %v\nEnter the drive ID manually instead", drivesErr, meDriveErr))
|
||||
}
|
||||
} else if drivesErr != nil {
|
||||
return fs.ConfigError("choose_type", fmt.Sprintf("Failed to query available drives: %v", drivesErr))
|
||||
|
||||
Reference in New Issue
Block a user