Skip to content

Improve error handling for platform detection in Python downloads#18453

Merged
zanieb merged 1 commit intoastral-sh:mainfrom
zaniebot:claude/fix-elf-interpreter-error-BWD1h
Mar 13, 2026
Merged

Improve error handling for platform detection in Python downloads#18453
zanieb merged 1 commit intoastral-sh:mainfrom
zaniebot:claude/fix-elf-interpreter-error-BWD1h

Conversation

@zanieb
Copy link
Copy Markdown
Member

@zanieb zanieb commented Mar 13, 2026

I noticed this weird error chain in #8635 (comment)

error: Failed to parse request part 
    Caused by: Could not read ELF interpreter from any of the following paths: /bin/sh, /usr/bin/env, /bin/dash, /bin/ls

…n failures

When `Platform::from_env()` fails due to libc detection (e.g., unable to
read ELF interpreter), the error was wrapped as `InvalidRequestPlatform`
("Failed to parse request part") via the blanket `#[from] platform::Error`
conversion. This is misleading because the failure is about detecting the
system's libc, not parsing a user request.

Route `LibcDetectionError` variants to the existing `LibcDetection` error
variant which has the correct message: "Failed to determine the libc used
on the current platform".

https://claude.ai/code/session_01YGKULoskvxdzhTShfgjM3r
@zanieb zanieb added the error messages Messaging when something goes wrong label Mar 13, 2026
@zaniebot zaniebot force-pushed the claude/fix-elf-interpreter-error-BWD1h branch from 819bd85 to 8582ac2 Compare March 13, 2026 18:59
@zanieb zanieb enabled auto-merge (squash) March 13, 2026 19:00
@zanieb zanieb merged commit f190514 into astral-sh:main Mar 13, 2026
101 of 104 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

error messages Messaging when something goes wrong

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants