BigPizzaV3/CodexPlusPlus · error · anyhow::Error
DreamSkin 服务返回了不支持的内容类型:{content_type}
Error message
DreamSkin 服务返回了不支持的内容类型:{content_type} What it means
Raised in download_limited: the DreamSkin service response Content-Type did not match the expected type (JSON catalog vs theme package), so the body is rejected to prevent parsing an unexpected format. The offending content type is included in the message.
Source
Thrown at crates/codex-plus-core/src/dream_skin_community.rs:410
) -> anyhow::Result<Vec<u8>> {
let response = client
.get(url)
.header(reqwest::header::ACCEPT, expected_content_type)
.send()
.await
.with_context(|| format!("请求失败:{url}"))?;
if !response.status().is_success() {
bail!("DreamSkin 服务返回 HTTP {}", response.status());
}
let content_type = response
.headers()
.get(reqwest::header::CONTENT_TYPE)
.and_then(|value| value.to_str().ok())
.and_then(|value| value.split(';').next())
.map(str::trim)
.unwrap_or_default();
if content_type != expected_content_type {
bail!("DreamSkin 服务返回了不支持的内容类型:{content_type}");
}
if response
.content_length()
.is_some_and(|length| length == 0 || length > limit as u64)
{
bail!("DreamSkin 响应超过大小限制");
}
let mut bytes = Vec::new();
let mut stream = response.bytes_stream();
while let Some(chunk) = stream.next().await {
let chunk = chunk?;
if bytes.len().saturating_add(chunk.len()) > limit {
bail!("DreamSkin 响应超过大小限制");
}
bytes.extend_from_slice(&chunk);
}
if bytes.is_empty() {
bail!("DreamSkin 服务返回空响应");View on GitHub (pinned to f2074595a2)
Solutions
- Retry; the server may have returned an error page with the wrong type
- Verify the endpoint still serves the expected media type
- Check for a captive portal/proxy injecting HTML responses
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at crates/codex-plus-core/src/dream_skin_community.rs:410 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of BigPizzaV3/CodexPlusPlus@f2074595a2 (2026-08-23).
Data as JSON: /api/errors/cb14a4443a6bc519.
Report an issue: GitHub.