From 85535667fb22221e8284a8fce54d93dbda1f7998 Mon Sep 17 00:00:00 2001 From: Johnny Huirilef Date: Tue, 20 Oct 2026 23:08:59 -0300 Subject: [PATCH] docs(res.sendFile): use res.status() in the example The example called res.send(403, body). Express 5 removed this signature, so the example sent a 200 response with the body "403". Use res.status(403).send(body). --- lib/response.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/response.js b/lib/response.js index 0d5a4ae4d4d..67ef102438e 100644 --- a/lib/response.js +++ b/lib/response.js @@ -364,7 +364,7 @@ res.sendStatus = function sendStatus(statusCode) { * if (yes) { * res.sendFile('/uploads/' + uid + '/' + file); * } else { - * res.send(403, 'Sorry! you can\'t see that.'); + * res.status(403).send('Sorry! you can\'t see that.'); * } * }); * });