Commit 02f9b49
fix(server): map SparrowEngineError::NvjpegUnavailable to 503 (Phase E regression)
Phase E commit 8788425 added SparrowEngineError::NvjpegUnavailable(String) to
the shared sparrow-engine-types crate and emits it from sparrow-engine-gpu
{yolo,classifier,tiled}.rs JpegDecoder::new paths. sparrow-engine-server's
bongo_into_response() match in error.rs was missed in that change, so any
sparrow-engine-dev build of sparrow-engine-server (CPU or GPU) fails:
error[E0004]: non-exhaustive patterns: `&sparrow_engine::SparrowEngineError::NvjpegUnavailable(_)` not covered
--> sparrow-engine-server/src/error.rs:98:32
The match is shared across flavors because the variant exists unconditionally
in sparrow-engine-types (not behind cfg). CPU never emits it but still must
handle it for type exhaustiveness.
Mapping: 503 SERVICE_UNAVAILABLE + code 'NVJPEG_UNAVAILABLE' — analogous to
existing EngineFreed -> SERVICE_UNAVAILABLE 'ENGINE_UNAVAILABLE' (line 101).
Semantically the GPU resource (libnvjpeg.so.12) is required but unavailable;
operator can recover by installing the runtime via SPARROW_ENGINE_NVJPEG_LIBRARY_PATH.
Verification:
- cargo check -p sparrow-engine-server --no-default-features --features cpu: PASS
- ./scripts/test.sh -p sparrow-engine-server --lib --no-default-features --features cpu: 53/53 PASS
Root cause discovered while rebuilding sparrow-engine images from sparrow-engine-dev
HEAD for sparrow webapp pin sync (sparrow side: chore/sparrow-engine-sync-2026-05-27).
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 6d70288 commit 02f9b49
1 file changed
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
| 137 | + | |
| 138 | + | |
137 | 139 | | |
138 | 140 | | |
139 | 141 | | |
| |||
0 commit comments