server: add path value to NOT_FOUND http error

Especially helpful for requests not coming from browsers (where the
URL is normally easy to find out).

Makes it easier to detect if one triggered a request with an old
client, or so..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht
2020-07-15 09:11:16 +02:00
parent ba5b8a3e76
commit 217c22c754
2 changed files with 4 additions and 4 deletions

View File

@ -55,7 +55,7 @@ impl <E: RpcEnvironment + Clone> H2Service<E> {
match self.router.find_method(&components, method, &mut uri_param) {
None => {
let err = http_err!(NOT_FOUND, "Path not found.".to_string());
let err = http_err!(NOT_FOUND, format!("Path '{}' not found.", path).to_string());
future::ok((formatter.format_error)(err)).boxed()
}
Some(api_method) => {