AlistGo/alist · error
failed to execute move request: %w
Error message
failed to execute move request: %w
What it means
The raw http.Client (again with no Timeout) failed transport-level on the move PUT: DNS, TCP, TLS, proxy, or context cancellation. Distinct from an API rejection — no HTTP response was obtained.
Source
Thrown at drivers/proton_drive/util.go:716
return fmt.Errorf("failed to marshal move request: %w", err)
}
httpReq, err := http.NewRequestWithContext(ctx, "PUT", moveURL, bytes.NewReader(reqBody))
if err != nil {
return fmt.Errorf("failed to create HTTP request: %w", err)
}
httpReq.Header.Set("Authorization", "Bearer "+d.credentials.AccessToken)
httpReq.Header.Set("Accept", d.protonJson)
httpReq.Header.Set("X-Pm-Appversion", d.webDriveAV)
httpReq.Header.Set("X-Pm-Drive-Sdk-Version", d.sdkVersion)
httpReq.Header.Set("X-Pm-Uid", d.credentials.UID)
httpReq.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, err := client.Do(httpReq)
if err != nil {
return fmt.Errorf("failed to execute move request: %w", err)
}
defer resp.Body.Close()
var moveResp RenameResponse
if err := json.NewDecoder(resp.Body).Decode(&moveResp); err != nil {
return fmt.Errorf("failed to decode move response: %w", err)
}
if moveResp.Code != 1000 {
return fmt.Errorf("move operation failed with code: %d", moveResp.Code)
}
return nil
}
func (d *ProtonDrive) DirectMove(ctx context.Context, srcObj model.Obj, dstDir model.Obj) (model.Obj, error) {
//fmt.Printf("DEBUG DirectMove: srcPath=%s, dstPath=%s", srcObj.GetPath(), dstDir.GetPath())
View on GitHub (pinned to 843d9dc814)
Solutions
- Retry once with backoff for transient resets; classify context.Canceled separately
- Verify egress to the Proton API host and proxy settings
- Set an explicit client Timeout so hangs become errors
- Use the shared authenticated client from the proton-go SDK instead of ad-hoc clients
Example fix
// before
client := &http.Client{}
// after
client := &http.Client{Timeout: 120 * time.Second} Defensive patterns
Strategy: retry
Try / catch
var netErr net.Error
if errors.As(err, &netErr) {
// transport failure on move PUT: backoff and retry
} else if errors.Is(err, context.Canceled) {
// aborted by caller — propagate as cancellation
} Prevention
- Give the move client a Timeout; large latency budgets for big trees
- Retry moves idempotently — Proton moves are atomic per link
When it happens
Trigger: Offline or firewalled host; proxy env vars routing to a dead proxy; TLS interception rejecting Proton's cert; ctx cancelled mid-request (user abort, shutdown).
Common situations: Laptop sleep/resume breaking long-lived connections; container images without CA bundles; moves cancelled by UI navigation; transient ISP resets.
Related errors
- failed to execute rename request: %w
- resp.String()
- stopped after 10 redirects
- upload request failed: %w
- gofile API error: HTTP %d - %s
AI-assisted analysis of AlistGo/alist@843d9dc814 (2026-08-15).
Data as JSON: /api/errors/e3ffd2e0c44b686a.
Report an issue: GitHub.