Skip to content

Commit

Permalink
Improve
Browse files Browse the repository at this point in the history
  • Loading branch information
iambriccardo committed Jul 5, 2024
1 parent c9a0096 commit 8b0a9e9
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion relay-event-schema/src/protocol/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -810,7 +810,9 @@ impl Getter for Event {

fn get_iter(&self, path: &str) -> Option<GetterIter<'_>> {
Some(match path.strip_prefix("event.")? {
"exceptions" => GetterIter::new_annotated(self.exceptions.value()?.values.value()?),
"exceptions.values" => {
GetterIter::new_annotated(self.exceptions.value()?.values.value()?)
}
_ => return None,
})
}
Expand Down Expand Up @@ -1264,6 +1266,14 @@ mod tests {
Some(Val::String("route")),
event.get_value("event.transaction.source")
);

let mut exceptions = event.get_iter("event.exceptions.values").unwrap();
let exception = exceptions.next().unwrap();
assert_eq!(
Some(Val::String("canvas.contentDocument")),
exception.get_value("value")
);
assert!(exceptions.next().is_none());
}

#[test]
Expand Down

0 comments on commit 8b0a9e9

Please sign in to comment.