diff --git a/backend/atlas_portal/routes/account.py b/backend/atlas_portal/routes/account.py index b178afc..f60f9da 100644 --- a/backend/atlas_portal/routes/account.py +++ b/backend/atlas_portal/routes/account.py @@ -509,5 +509,6 @@ def register(app) -> None: try: result = trigger_nextcloud_mail_sync(username, wait=wait) return jsonify(result) - except Exception: - return jsonify({"error": "failed to sync nextcloud mail"}), 502 + except Exception as exc: + message = str(exc).strip() or "failed to sync nextcloud mail" + return jsonify({"error": message}), 502