diff --git a/go_cloud/internal/storage/webdav.go b/go_cloud/internal/storage/webdav.go index 490f98e..4d53853 100644 --- a/go_cloud/internal/storage/webdav.go +++ b/go_cloud/internal/storage/webdav.go @@ -77,11 +77,15 @@ func (c *WebDAVClient) ensureParent(ctx context.Context, remotePath string) erro if err != nil { return err } + // Read body for diagnostics + b, _ := io.ReadAll(resp.Body) resp.Body.Close() // 201 created, 405 exists — ignore if resp.StatusCode == 201 || resp.StatusCode == 405 { continue } + // Any other status is an error: return with diagnostics so caller can log and act on it + return fmt.Errorf("MKCOL failed for %s: status=%d body=%s", mkurl, resp.StatusCode, string(b)) } return nil }