server alive
This commit is contained in:
parent
1c17b57d8a
commit
fab0e979d5
11 changed files with 353 additions and 28 deletions
|
|
@ -33,7 +33,7 @@ class EventSearch(BaseEvent):
|
|||
if 'geometry' not in j:
|
||||
logger.warning("Request body missing 'geometry' field")
|
||||
resp.status = falcon.HTTP_400
|
||||
resp.body = json.dumps({"error": "Request body must contain a 'geometry' field"})
|
||||
resp.text = json.dumps({"error": "Request body must contain a 'geometry' field"})
|
||||
return
|
||||
|
||||
# Pass the query with the geometry to event.on_get
|
||||
|
|
@ -44,8 +44,8 @@ class EventSearch(BaseEvent):
|
|||
except json.JSONDecodeError as e:
|
||||
logger.error(f"Error decoding JSON: {e}")
|
||||
resp.status = falcon.HTTP_400
|
||||
resp.body = json.dumps({"error": "Invalid JSON in request body"})
|
||||
resp.text = json.dumps({"error": "Invalid JSON in request body"})
|
||||
except Exception as e:
|
||||
logger.error(f"Error processing POST request to /event/search: {e}")
|
||||
resp.status = falcon.HTTP_500
|
||||
resp.body = json.dumps({"error": str(e)})
|
||||
resp.text = json.dumps({"error": str(e)})
|
||||
Loading…
Add table
Add a link
Reference in a new issue