fix: replace 'e.message' with str(e) and add @with_object_filters to ServerNode.list
Two pre-existing master bugs surfaced by the data-isolation regression tests: 1. 'e.message' on caught exceptions (13 sites). Exception.message was removed in Python 3 (it lived on BaseException in Py2). When the except handler runs, accessing e.message raises AttributeError, masking the original exception. Werkzeug HTTPException doesn't expose .message either - it uses .description / .__str__. Replace 'e.message' with str(e) across: - browser/server_groups/__init__.py (delete/update/create handlers) - browser/server_groups/servers/__init__.py (5 handlers) - browser/server_groups/servers/databases/__init__.py - misc/cloud/__init__.py - tools/debugger/__init__.py - tools/grant_wizard/__init__.py (2 sites) Sites guarded by hasattr(e, 'message') first (psycopg3 driver) are left as-is; module.messages dict access (utils/__init__) is also unrelated. 2. ServerNode.list() missing @with_object_filters decorator. PR #8917 (99b822e47) added object_filters as a required positional arg to list() but only added the @with_object_filters decorator to get_nodes(), leaving list() with a signature the Flask routing couldn't satisfy. Surfaced by SharedServersGetTestCase 'Get a all shared server' test, which calls the list endpoint directly.
A
Ashesh Vashi committed
4eb184739a4159cd2d69858ce27a679f4e1c258d
Parent: d57acce