jdx/mise · error
relay log format must be text or jsonl
Error message
relay log format must be text or jsonl
What it means
configure validates the relay log format: it takes the --github-relay-log-format value or the [github_relay].log_format setting, and rejects anything other than the literals "text" or "jsonl". This catches typos and unsupported formats before the relay starts.
Source
Thrown at src/github_relay.rs:94
/// Resolve observability and limits only after explicit access authorization.
pub(crate) fn configure(
scope: Option<Scope>,
log_requests: bool,
no_log_requests: bool,
format: Option<&str>,
max_duration: Option<&str>,
) -> Result<Option<Scope>> {
let Some(scope) = scope else {
if log_requests || no_log_requests || format.is_some() || max_duration.is_some() {
bail!("relay options require --github-relay-read-only");
}
return Ok(None);
};
let settings = crate::config::Settings::get();
let settings = &settings.github_relay;
let format = format.unwrap_or(&settings.log_format);
if !matches!(format, "text" | "jsonl") {
bail!("relay log format must be text or jsonl");
}
let timeout = duration::parse_duration(&settings.request_timeout)?;
if timeout.is_zero() {
bail!("relay request timeout must be greater than zero");
}
if !(1..=32).contains(&settings.concurrency) {
bail!("relay concurrency must be between 1 and 32");
}
let max_duration = duration::parse_duration(max_duration.unwrap_or(&settings.max_duration))?;
if std::time::Instant::now().checked_add(timeout).is_none()
|| std::time::Instant::now()
.checked_add(max_duration)
.is_none()
{
bail!("relay duration is too large");
}
#[cfg(not(unix))]
let _ = max_duration;View on GitHub (pinned to afd2eddd3a)
Solutions
- Set the format to "text" or "jsonl" exactly: --github-relay-log-format jsonl.
- Fix the [github_relay] log_format value in mise.toml if it comes from config.
- Omit the flag to fall back to the configured default from settings.github_relay.log_format.
Example fix
// before (mise.toml) [github_relay] log_format = "json" // after [github_relay] log_format = "jsonl"
Defensive patterns
Strategy: validation
Validate before calling
let f = settings.github_relay.log_format.as_str(); assert!(matches!(f, "text" | "jsonl"), "log_format must be text or jsonl");
Type guard
fn is_valid_log_format(f: &str) -> bool {
matches!(f, "text" | "jsonl")
} Try / catch
match configure(scope, lr, nlr, format, max_duration) {
Err(e) if e.to_string().contains("text or jsonl") => {
// correct the format and retry
}
r => r,
} Prevention
- Use exactly "text" or "jsonl"; "json" alone is not accepted.
- Validate mise.toml [github_relay] values after copy-pasting from other tools' configs.
- Check for schema/config drift when upgrading mise versions.
When it happens
Trigger: configure is called with format set to a value not matching "text"|"jsonl" (CLI flag) or the setting github_relay.log_format in mise.toml/settings is such a value and no CLI override is given.
Common situations: Typo like `--github-relay-log-format json`; using "json"/"pretty" by analogy with other tools; stale config from an older mise version that allowed other formats.
Understand the failure class
Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.
Related errors
- relay request timeout must be greater than zero
- Invalid checksum format: {}
- {option}: '{name}' must be a plain file name (no path separa
- {option}: '{path}' must be a safe relative path (no absolute
- repository scope requires --github-relay-read-only
AI-assisted analysis of jdx/mise@afd2eddd3a (2026-09-09).
Data as JSON: /api/errors/3b99abd7a3b0ab1f.
Report an issue: GitHub.