server: add --media-path for local media files (#17697)

* server: add --media-path for local media files

* remove unused fn
This commit is contained in:
Xuan-Son Nguyen
2025-12-02 22:49:20 +01:00
committed by GitHub
parent a96283adc4
commit 13628d8bdb
9 changed files with 133 additions and 38 deletions
+2
View File
@@ -38,9 +38,11 @@ static server_http_context::handler_t ex_wrapper(server_http_context::handler_t
try {
return func(req);
} catch (const std::invalid_argument & e) {
// treat invalid_argument as invalid request (400)
error = ERROR_TYPE_INVALID_REQUEST;
message = e.what();
} catch (const std::exception & e) {
// treat other exceptions as server error (500)
error = ERROR_TYPE_SERVER;
message = e.what();
} catch (...) {