refs #708 handle some invalid URLs and return 404

pull/9/head
Natalia Serrano 2024-09-19 14:15:01 +02:00 committed by Natalia Serrano
parent 274d8d448c
commit 3682ac2b1d
1 changed files with 2 additions and 0 deletions

View File

@ -88,6 +88,8 @@ class HTTPServerHandler(BaseHTTPRequestHandler):
Locates witch module will process the message based on path (first folder on url path)
"""
try:
if module is None:
raise Exception ({ '_httpcode': 404, '_msg': f'Module {path[0]} not found' })
data = module.processServerMessage(path, get_params, post_params, self)
self.sendJsonResponse(data)
except Exception as e: