Skip to content

Commit

Permalink
AVRO-3851: [Rust] Validate default value for record fields and enums …
Browse files Browse the repository at this point in the history
…on parsing (#2481)
  • Loading branch information
sarutak authored Sep 7, 2023
1 parent 2e03ee9 commit 2244da0
Show file tree
Hide file tree
Showing 4 changed files with 779 additions and 39 deletions.
3 changes: 3 additions & 0 deletions lang/rust/avro/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,9 @@ pub enum Error {
#[error("One union type {0:?} must match the `default`'s value type {1:?}")]
GetDefaultUnion(SchemaKind, ValueKind),

#[error("`default`'s value type of field {0:?} in {1:?} must be {2:?}")]
GetDefaultRecordField(String, String, String),

#[error("JSON value {0} claims to be u64 but cannot be converted")]
GetU64FromJson(serde_json::Number),

Expand Down
Loading

0 comments on commit 2244da0

Please sign in to comment.