error: make public errors structured and fatal-only#134
Conversation
|
126 merged. this can be rebased |
4b5d3ec to
1706bdd
Compare
|
@zRedShift what's the point of this PR? Feels like we're handling empty records in like 2 places in the code path already. |
|
@algesten the intent here isn’t to handle parsed empty records. this is before we have a record at all: a datagram that only contains an incomplete DTLS record header or body currently bubbles up as ParseIncomplete from handle_packet. the PR makes that look like normal UDP loss/truncation and drops it without turning it into a connection-level error. |
|
@zRedShift ok, but what about what we said in Discord about maybe not having ParseIncomplete as an error at all? |
|
@algesten i was a bit hesitant to take that plunge wholesale since it might become a big pr, but i agree this pr is too narrow and doesn’t buy us much. how about i rework it into a proper implementation of that idea and we’ll see from there? |
2bc19e3 to
9ee8e62
Compare
9ee8e62 to
b119413
Compare
Follow-up to #126. This is a breaking API cleanup.
This makes the public
ErrorAPI represent connection-fatal outcomes rather than recoverable UDP/parser noise. Transient parser failures stay internal and are swallowed at public packet boundaries.Changes:
ParseIncomplete,ParseError, andTooManyRecordsfromError;Stringto typed errors;Stringpayloads;Errorsize from 32 bytes to 16 bytes on this target;Validation:
cargo fmt --checkgit diff --checkgit diff --check upstream/main...HEAD/home/ronen/.codex/skills/dimpl/scripts/check-snowflake-local.pl upstream/maincargo test --all-targets --features rcgencargo clippy --all-targets --features rcgen -- -D warningscargo test --no-default-features --features rust-cryptocargo clippy --no-default-features --features rust-crypto -- -D warningscargo test --doc --features rcgen