cloudflare/quiche · warning

An error happened, stopping.

Error message

An error happened, stopping.

What it means

In settings_read_loop of h3i's interactive settings prompt, each 'setting value:' Text prompt is unwrapped with expect('An error happened, stopping.'), panicking when inquire fails. This happens when the user cancels the prompt or stdin is not interactive.

Solutions

  1. Enter a value (validated as a varint u64) instead of cancelling.
  2. Use the prompt's cancel/skip path intended by the loop rather than ESC mid-entry.
  3. Propagate the InquireError with ? and break the loop gracefully.

Example fix

// before
.prompt().expect("An error happened, stopping.").parse::<u64>().unwrap();
// after
.prompt()? .parse::<u64>().map_err(|_| inquire::InquireError::OperationCanceled)?;
Defensive patterns

Strategy: try-catch

Validate before calling

if !atty::is(atty::Stream::Stdin) {
    eprintln!("settings prompt requires a TTY");
    std::process::exit(1);
}

Try / catch

let value = Text::new("setting value:")
    .with_validator(h3::validate_varint)
    .prompt()?;

Prevention

When it happens

Trigger: Pressing ESC/Ctrl-C while entering a setting value in the settings prompt loop; running the interactive prompt in a non-TTY context.

Common situations: Piping commands into h3i; aborting the settings entry mid-loop; containers without -t.

Related errors


AI-assisted analysis of cloudflare/quiche@9f96daa2c2 (2026-09-08). Data as JSON: /api/errors/ce2225a8be00d4f1. Report an issue: GitHub.

Appendix: source

Thrown at h3i/src/prompts/h3/settings.rs:108

                println!("An error happened, stopping.");
                break;
            },
        };

        let ty = match ty.as_str() {
            QPACK_MAX_TABLE_CAPACITY => 0x1,
            MAX_FIELD_SECTION_SIZE => 0x6,
            QPACK_BLOCKED_STREAMS => 0x7,
            ENABLE_CONNECT_PROTOCOL => 0x8,
            H3_DATAGRAM => 0x33,

            v => v.parse::<u64>().unwrap(),
        };

        let value = Text::new("setting value:")
            .with_validator(h3::validate_varint)
            .prompt()
            .expect("An error happened, stopping.")
            .parse::<u64>()
            .unwrap();

        settings.push((ty, value));
    }

    settings
}

fn validate_setting_type(id: &str) -> SuggestionResult<Validation> {
    if matches!(
        id,
        "q!" | QPACK_MAX_TABLE_CAPACITY |
            MAX_FIELD_SECTION_SIZE |
            QPACK_BLOCKED_STREAMS |
            ENABLE_CONNECT_PROTOCOL |
            H3_DATAGRAM
    ) {

View on GitHub (pinned to 9f96daa2c2)