GET /api/edges returns 500 when a traceroute has route = None #54

Closed
opened 2026-10-05 06:04:09 +02:00 by adam · 1 comment
Owner

Description

The /api/edges endpoint crashes with HTTP 500 when any traceroute record has route = None (malformed or incomplete packet).
A single such packet takes down the endpoint for all users until the service is restarted.

Traceback

File "/app/meshview/web_api/api.py", line 484, in api_edges
path = [tr.packet.from_node_id] + list(route.route)
^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'route'

Proposed fix

Add a guard before line 484:

if route is None or route.route is None:
    continue
path = [tr.packet.from_node_id] + list(route.route)

Notes

Fix applied on our instance and confirmed working.

## Description The /api/edges endpoint crashes with HTTP 500 when any traceroute record has route = None (malformed or incomplete packet). A single such packet takes down the endpoint for all users until the service is restarted. ## Traceback File "/app/meshview/web_api/api.py", line 484, in api_edges path = [tr.packet.from_node_id] + list(route.route) ^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'route' ## Proposed fix Add a guard before line 484: if route is None or route.route is None: continue path = [tr.packet.from_node_id] + list(route.route) ## Notes Fix applied on our instance and confirmed working. <!-- github-sync-id:4252847801 -->
adam closed this issue 2026-10-05 06:04:09 +02:00
Author
Owner

Thank you, fix will be added to version 3.6

Thank you, fix will be added to version 3.6 <!-- github-comment-id:4271601455 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/meshview#54