We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8901c38 commit 653a3bfCopy full SHA for 653a3bf
src/worker/jobs/update_default_version.rs
@@ -40,11 +40,14 @@ impl BackgroundJob for UpdateDefaultVersion {
40
.first::<String>(&mut conn)
41
.await,
42
);
43
- if let Err(diesel::result::Error::DatabaseError(
44
- diesel::result::DatabaseErrorKind::ForeignKeyViolation,
45
- ..,
46
- )) = crate_name
47
- {
+
+ if matches!(
+ crate_name,
+ Err(diesel::result::Error::DatabaseError(
+ diesel::result::DatabaseErrorKind::ForeignKeyViolation,
48
+ ..,
49
+ )) | Err(diesel::result::Error::NotFound)
50
+ ) {
51
warn!("Skipping update default version for crate for {crate_id}: no crate found");
52
return Ok(());
53
}
0 commit comments