feature/edit-tag #66

Merged
cameron merged 3 commits from feature/edit-tag into master 2026-05-01 01:03:41 +00:00
Showing only changes of commit 98601973f7 - Show all commits

View File

@@ -2311,6 +2311,12 @@ async fn update_face_handler<D: FaceDao>(
let mut new_embedding: Option<Vec<u8>> = None; let mut new_embedding: Option<Vec<u8>> = None;
if let Some((bx, by, bw, bh)) = bbox_patch { if let Some((bx, by, bw, bh)) = bbox_patch {
if !face_client.is_enabled() { if !face_client.is_enabled() {
warn!(
"PATCH /image/faces/{}: 503 — face client not enabled \
(APOLLO_FACE_API_BASE_URL / APOLLO_API_BASE_URL both unset). \
Bbox edit requires Apollo to re-embed.",
id
);
return HttpResponse::ServiceUnavailable() return HttpResponse::ServiceUnavailable()
.body("face client disabled — bbox edit requires Apollo"); .body("face client disabled — bbox edit requires Apollo");
} }
@@ -2387,9 +2393,19 @@ async fn update_face_handler<D: FaceDao>(
); );
} }
Err(FaceDetectError::Transient(e)) => { Err(FaceDetectError::Transient(e)) => {
warn!(
"PATCH /image/faces/{}: 503 — Apollo face client transient \
error during re-embed: {}",
id, e
);
return HttpResponse::ServiceUnavailable().body(format!("{}", e)); return HttpResponse::ServiceUnavailable().body(format!("{}", e));
} }
Err(FaceDetectError::Disabled) => { Err(FaceDetectError::Disabled) => {
warn!(
"PATCH /image/faces/{}: 503 — face client became disabled \
mid-flight",
id
);
return HttpResponse::ServiceUnavailable().body("face client disabled mid-flight"); return HttpResponse::ServiceUnavailable().body("face client disabled mid-flight");
} }
} }