Improve 404 handling

This commit is contained in:
Matthias
2019-05-11 13:18:11 +02:00
parent 03dc6d92ae
commit 557f849519
2 changed files with 13 additions and 1 deletions

View File

@@ -156,7 +156,7 @@ class ApiServer(RPC):
"""
return self.rest_dump({
'status': 'error',
'reason': '''There's no API call for %s''' % request.base_url,
'reason': f"There's no API call for {request.base_url}.",
'code': 404
}), 404