mirror of
https://github.com/agessaman/meshcore-bot.git
synced 2026-11-10 06:37:17 +00:00
42 routes wrapped their whole body in try / except Exception as e: self.logger.error(f'<prefix>: {e}'); return jsonify({'error': str(e)}), 500. Exactly those (matched by AST: one handler, that log call shape, that return, nothing else) now use @self._api_errors('<prefix>') under their route decorator, which logs the same line and returns the same response; functools.wraps keeps the endpoint names the CSP nonce list and url_for depend on. The endpoint inventory golden is unchanged. Routes with any other error handling are untouched.
Dedenting the bodies changed the indentation inside one multi-line SQL string in api_recent_commands; SQLite ignores it.