rusackas opened a new pull request, #37345:
URL: https://github.com/apache/superset/pull/37345

   ### SUMMARY
   This PR extracts `custom_errors` from database engine specs and displays 
them in a new "Troubleshooting" section on each database's documentation page. 
This provides zero-maintenance troubleshooting documentation that stays in sync 
with the actual error handling code.
   
   **Key features:**
   - Errors grouped by category (Authentication, Connection, Query, 
Permissions, etc.)
   - Human-readable error messages with solution hints
   - Links to related issue codes
   - Invalid field indicators to help users know what to check
   
   Currently extracts **73 custom errors** across **18 databases** including:
   - PostgreSQL (9 errors)
   - MySQL (5 errors) 
   - BigQuery (5 errors)
   - Presto/Trino (8 errors)
   - Denodo (10 errors)
   - And more...
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   **Before:** Database pages had no troubleshooting information
   
   **After:** Each database page that has `custom_errors` defined in its engine 
spec now shows a collapsible "Troubleshooting" section with categorized error 
messages:
   
   ```
   🐛 Troubleshooting
   ├── Authentication (2 errors)
   │   ├── Invalid username: 'The username "%(username)s" does not exist.'
   │   │   Check these fields: [username]
   │   │   Related: Issue 1012
   │   └── Invalid password: 'The password provided for username "%(username)s" 
is incorrect.'
   │       Check these fields: [username, password]
   │       Related: Issue 1013
   ├── Connection (3 errors)
   │   └── ...
   └── Query (4 errors)
       └── ...
   ```
   
   ### TESTING INSTRUCTIONS
   1. Build docs locally: `cd docs && npm run build`
   2. Start local preview: `npm run serve`
   3. Navigate to a database page with custom errors (e.g., PostgreSQL, MySQL, 
BigQuery)
   4. Scroll down to verify the "Troubleshooting" section appears with 
categorized errors
   5. Click on error categories to expand and see the error details
   6. Verify issue code links point to the correct anchor
   
   ### ADDITIONAL INFORMATION
   
   **Files changed:**
   - `docs/scripts/extract_custom_errors.py` - New Python script to parse 
custom_errors from engine specs
   - `docs/scripts/generate-database-docs.mjs` - Integrates custom_errors 
extraction into docs generation
   - `docs/src/components/databases/types.ts` - Adds CustomError interface
   - `docs/src/components/databases/DatabasePage.tsx` - Renders the 
Troubleshooting section
   - `docs/src/data/databases.json` - Updated with custom_errors data
   
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [x] Changes UI
   - [ ] Includes DB Migration
   - [x] Introduces new feature or API
   - [ ] Removes existing feature or API
   
   🤖 Generated with [Claude Code](https://claude.ai/code)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to