Enrich external API failure audit metadata

This commit is contained in:
kdletters
2026-05-28 15:42:46 +08:00
parent 2cd2b9704b
commit f1fb92aa29
40 changed files with 315 additions and 152 deletions

View File

@@ -98,7 +98,10 @@ pub fn should_rebind_orphan_work_owner(
return false;
}
!matches!(auth_user_service.get_user_by_id(&owner_user_id), Ok(Some(_)))
!matches!(
auth_user_service.get_user_by_id(&owner_user_id),
Ok(Some(_))
)
}
#[cfg(test)]
@@ -137,6 +140,9 @@ mod tests {
assert!(should_rebind_orphan_work_owner(&service, ""));
assert!(should_rebind_orphan_work_owner(&service, "user_missing"));
assert!(!should_rebind_orphan_work_owner(&service, ORPHAN_WORK_OWNER_USER_ID));
assert!(!should_rebind_orphan_work_owner(
&service,
ORPHAN_WORK_OWNER_USER_ID
));
}
}