A comprehensive error handling solution designed to streamline error management and user feedback in UI applications. This project combines a modern React frontend with a Python FastAPI backend for robust error handling and monitoring.
- @cjlokesh (Code Owner)
- Maintainer contact: opensource@amadeus.com
- For bug reports and feature requests, use GitHub issues (templates are preconfigured)
- Project Structure
- Tech Stack
- Installation
- Getting Started
- Package Setup
- Running the Application
- Running Backend Tests
The application is divided into two main components:
- Frontend - React-based user interface
- Backend - Python-based API server
- Node.js v24.13.0
- React v19.2.0
- Vite - Fast build tool
- TypeScript - Type safety
- ESLint - Code linting
- Python v3.9.6
- FastAPI v0.128.0
- Local installable pip package (
smart-error-handler-backend)
git clone https://github.com/AmadeusITGroup/SmartErrorHandler
cd SmartErrorHandler-
Navigate to the frontend workspace directory:
cd src/frontend -
Install dependencies and local package links:
npm install
This installs the local UI package from
src/frontend/error-ui.
-
From the repository root, create and activate virtual environment:
python3 -m venv .venv source .venv/bin/activate # On macOS/Linux # or .venv\Scripts\activate # On Windows
-
Install backend as a local package (dependencies included):
pip install ./src/backend
Development must be done on the dev branch. The main branch is the release branch.
git checkout devThe backend is configured as a local pip package:
- Package name:
smart-error-handler-backend - Local install command:
pip install ./src/backend - Start command after install:
smart-error-handler-api
The frontend UI is configured as a local npm package:
- Package name:
smart-error-handler-ui - Installed locally through:
src/frontend/package.json - Local install command:
npm installfromsrc/frontend
Prerequisites: Install frontend and backend dependencies as shown above.
-
Start Backend (Terminal 1):
cd SmartErrorHandler source .venv/bin/activate smart-error-handler-api
β Wait for confirmation: server running at
http://localhost:8000/ping -
Start Frontend (Terminal 2):
cd SmartErrorHandler/src/frontend/error-ui npm run devβ Frontend ready at
http://localhost:5173 -
Access the Application:
Open your browser and navigate to the frontend URL.
npm install(fromsrc/frontend) - Install local package and dependenciesnpm run dev(fromsrc/frontend/error-ui) - Start development servernpm run build(fromsrc/frontend/error-ui) - Build frontend package/app
pip install ./src/backend- Install backend package with dependenciessmart-error-handler-api- Start backend API server
-
Activate your virtual environment:
source .venv/bin/activate -
Install test dependencies:
pip install pytest httpx
-
Run backend tests from repository root:
pytest -q src/backend/tests
Or, if your current directory is
src:pytest -q backend/tests
Once you have tested the application from the UI, error snapshots are automatically captured and saved as HTML files.
Output Location:
SmartErrorHandler/src/backend/error_snapshots/
View Results:
- Navigate to the
error_snapshotsfolder in your project directory - Open any
.htmlfile in your web browser to view detailed error reports and diagnostics - Each snapshot contains comprehensive error information useful for debugging and analysis
These HTML snapshots provide a complete record of errors encountered during testing for future reference and troubleshooting.