Skip to content

Commit 3afa4bb

Browse files
committed
fix(http): Status 404 should be returned by default when no not notFoundHandler is set. This is not an internal server error.
1 parent 07740d1 commit 3afa4bb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/WebHandlers.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ void AsyncCallbackWebHandler::handleRequest(AsyncWebServerRequest *request) {
299299
if (_onRequest) {
300300
_onRequest(request);
301301
} else {
302-
request->send(500);
302+
request->send(404, T_text_plain, "Not found");
303303
}
304304
}
305305
void AsyncCallbackWebHandler::handleUpload(AsyncWebServerRequest *request, const String &filename, size_t index, uint8_t *data, size_t len, bool final) {

0 commit comments

Comments
 (0)