Moved failed LXC installation cleanup logic from error_handler.func to build.func. Now, if installation fails, the user is prompted to remove the broken container with a 60s timeout, and the installation log is copied for debugging. Removed the cleanup_failed_lxc function and related trap from error_handler.func for better encapsulation.
Introduces the cleanup_failed_lxc function to prompt for and remove broken containers after failed LXC installs. Updates catch_errors to invoke this cleanup on EXIT, ensuring failed containers are handled automatically or with user confirmation.
Moved the explain_exit_code function directly into api.func, removing external dependency loading. Also cleaned up merge conflict markers and unified documentation for diagnostics_check in build.func.
Expanded inline documentation and section headers across misc/api.func, misc/build.func, misc/core.func, misc/error_handler.func, and misc/install.func for improved maintainability and clarity. Refactored error handling to use centralized explain_exit_code and updated API telemetry/reporting logic. Enhanced modularity and structure of utility, validation, and setup functions, and improved comments for user guidance and developer onboarding.
Enhanced the installation script to provide clearer success and error messages, added exit on critical failures, and improved verification steps for package installation, Podman, and UniFi OS installer. Also refined the startup sequence and logging for better troubleshooting.
Enhanced error handling and user feedback during base package installation, Podman configuration, and UniFi OS VM startup. Added clearer status messages, improved retry logic, and more informative progress updates for VM boot and UniFi OS installation steps.