From 2a2272e9deedf690e746a30c28dd1c36175cc510 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jesper=20Steen=20M=C3=B8ller?= Date: Wed, 20 Sep 2023 08:40:23 +0200 Subject: [PATCH] Added guide documentation for new status codes. --- site/guide/4-requests.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/site/guide/4-requests.md b/site/guide/4-requests.md index 4fe8fee5b7..32d2038ceb 100644 --- a/site/guide/4-requests.md +++ b/site/guide/4-requests.md @@ -2020,6 +2020,13 @@ fn main() { } ``` +Besides `404 Not Found` for unknown URIs, Rocket may also produce +`405 Method Not Allowed` if a request matches a URI but not a declared method +for that URI. For routes declaring formats, Rocket will produce +`406 Not Acceptable` status for a client request _accepting_ a format which +isn't declared by the matching routes, or `415 Unsupported Media Type` in case +the _payload_ of a `PUT` or `POST` is not allowed by the route. + ### Scoping The first argument to `register()` is a path to scope the catcher under called