]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commit
server: return proper HTTP status codes for error responses (#3707)
authorIgor Loskutov <redacted>
Mon, 16 Mar 2026 11:33:06 +0000 (07:33 -0400)
committerGitHub <redacted>
Mon, 16 Mar 2026 11:33:06 +0000 (13:33 +0200)
commit136dc2eb1254e3f944caa1317e128283d97aa3a5
treebbd85bfb88cd35816cbfb7894801ce4fe5cab2aa
parent27fa20774a34b36bfe18edd7572ed42ef601bc3b
server: return proper HTTP status codes for error responses (#3707)

Several error paths in the /inference and /load endpoints returned
HTTP 200 with a JSON error body, making it impossible for clients
to distinguish errors from successful responses by status code.

Set 400 for client errors (missing file field, unreadable audio,
missing/invalid model) and 500 for server errors (ffmpeg conversion
failure). The two existing status-code sites (499 for client
disconnect, 500 for processing failure) are unchanged.
examples/server/server.cpp