Skip to content

Commit 7a922df

Browse files
Avoid panicking on not-yet inserted artifacts
This is needed until the collector reboots.
1 parent 7ad3f28 commit 7a922df

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

database/src/pool/postgres.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -862,7 +862,9 @@ where
862862
&[&aid],
863863
)
864864
.await
865-
.unwrap();
865+
// If we couldn't find the row, early exit with `None`. This is a
866+
// transition state -- wouldn't be needed in the long run.
867+
.ok()?;
866868

867869
let ty = row.get::<_, String>(2);
868870
Some(match ty.as_str() {

0 commit comments

Comments
 (0)