Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions h3i/src/prompts/h3/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,12 @@ pub const APPLICATION: &str = "application";
pub fn prompt_transport_or_app_error() -> InquireResult<(ErrorSpace, u64)> {
let trans_or_app = prompt_transport_or_app()?;
let space = if trans_or_app == TRANSPORT {
ErrorSpace::TransportError
ErrorSpace::Transport
} else {
ErrorSpace::ApplicationError
ErrorSpace::Application
};

let error_code = if matches!(space, ErrorSpace::TransportError) {
let error_code = if matches!(space, ErrorSpace::Transport) {
let error_code = Text::new("error code:")
.with_validator(validate_transport_error_code)
.with_autocomplete(&transport_error_code_suggestor)
Expand Down
2 changes: 1 addition & 1 deletion h3i/src/prompts/h3/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ pub fn prompt_connection_close() -> InquireResult<Action> {

Ok(Action::ConnectionClose {
error: ConnectionError {
is_app: matches!(error_space, ErrorSpace::ApplicationError),
is_app: matches!(error_space, ErrorSpace::Application),
error_code,
reason: reason.as_bytes().to_vec(),
},
Expand Down
6 changes: 3 additions & 3 deletions h3i/src/recordreplay/qlog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -282,9 +282,9 @@ impl From<&Action> for QlogEvents {

Action::ConnectionClose { error } => {
let error_space = if error.is_app {
ErrorSpace::ApplicationError
ErrorSpace::Application
} else {
ErrorSpace::TransportError
ErrorSpace::Transport
};

let reason = if error.reason.is_empty() {
Expand Down Expand Up @@ -409,7 +409,7 @@ impl From<&PacketSent> for H3Actions {
error_space.as_ref().expect(
"invalid CC frame in qlog input, no error space"
),
ErrorSpace::ApplicationError
ErrorSpace::Application
);

actions.push(Action::ConnectionClose {
Expand Down
4 changes: 2 additions & 2 deletions qlog/src/events/quic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,8 @@ pub enum StreamState {
#[derive(Serialize, Deserialize, Clone, PartialEq, Eq, Debug)]
#[serde(rename_all = "snake_case")]
pub enum ErrorSpace {
TransportError,
ApplicationError,
Transport,
Application,
}

#[derive(Serialize, Deserialize, Clone, PartialEq, Eq, Debug)]
Expand Down
4 changes: 2 additions & 2 deletions quiche/src/frame.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1005,7 +1005,7 @@ impl Frame {
Frame::ConnectionClose {
error_code, reason, ..
} => QuicFrame::ConnectionClose {
error_space: Some(ErrorSpace::TransportError),
error_space: Some(ErrorSpace::Transport),
error_code: Some(*error_code),
error_code_value: None, // raw error is no different for us
reason: Some(String::from_utf8_lossy(reason).into_owned()),
Expand All @@ -1014,7 +1014,7 @@ impl Frame {

Frame::ApplicationClose { error_code, reason } => {
QuicFrame::ConnectionClose {
error_space: Some(ErrorSpace::ApplicationError),
error_space: Some(ErrorSpace::Application),
error_code: Some(*error_code),
error_code_value: None, // raw error is no different for us
reason: Some(String::from_utf8_lossy(reason).into_owned()),
Expand Down