When using the snap management features of the new UI (23.10+) it is possible to attempt snap management on hosts that do not support it. This results in an unspecified "Server error" message on the UI, and an unclear error message / stack trace in the API logs:
api-2 ERR Traceback (most recent call last):
api-2 ERR File \"/opt/canonical/landscape/canonical/landscape/api/resource.py\", line 197, in handle_path
api-2 ERR body, status = await call_handler(handler, request)
api-2 ERR File \"/opt/canonical/landscape/canonical/landscape/api/helpers.py\", line 685, in call_handler
api-2 ERR return await handler(*args, **kwargs)
api-2 ERR File \"/opt/canonical/landscape/canonical/landscape/api/jwt_auth.py\", line 160, in wrapper
api-2 ERR return await handler(request, principal, *args, **kwargs)
api-2 ERR File \"/opt/canonical/landscape/canonical/landscape/api/helpers.py\", line 668, in wrapper
api-2 ERR return await handler(
api-2 ERR File \"/opt/canonical/landscape/canonical/landscape/api/helpers.py\", line 504, in wrapper
api-2 ERR return await handler(request, principal, selection, *args, **kwargs)
api-2 ERR File \"/opt/canonical/landscape/canonical/landscape/api/snap.py\", line 67, in snaps_action_handler
api-2 ERR unsupported_computers = \", \".join(
api-2 ERR TypeError: 'method' object is not iterable
Without more information it is difficult to determine where the issue occurred. Ideally, error handlers should exist for snap management that include the nature of the problem to appear in a modal / error message on the UI as well as in the logs along with a 500 response code (if appropriate).
To reproduce, attempt to install a snap on a Landscape client running a version older than 23.02.