feat: centralized error reporting → GitHub Issues
- PHP (api/index.php): hardcode GH_ISSUE_TOKEN/GH_REPO constants at top of file (before exception handler runs); fix $fp_ variable interpolation bug; global set_exception_handler + register_shutdown_function; reportError() endpoint (POST ?action=report_error) with rate limiting, local log, dedup via fingerprint search on GitHub Issues API - Kiosk (ErrorReporter.kt): add crash persistence – saves crash payload to SharedPreferences before network POST, clears on success, retries as 'uncaught-exception-survived' on next launch via sendPendingCrash() in init() - Scale Gateway: new ErrorReporter.kt – calls GitHub Issues API directly (no relay needed, token hardcoded, scoped Issues R+W only); crash persistence via SharedPreferences; MainActivity.kt hooked at onCreate, startGatewayServer catch, onError (BLE errors) Tested end-to-end: issues #3-#6 created and closed during QA.
This commit is contained in:
+2
-7
@@ -21,10 +21,5 @@ TTS_CONTENT_TYPE=application/json
|
||||
TTS_PAYLOAD_KEY=message
|
||||
TTS_ENABLED=false
|
||||
|
||||
# GitHub Error Reporting (optional but recommended)
|
||||
# Creates GitHub Issues automatically on crashes/errors from app, kiosk and server.
|
||||
# Create a fine-grained PAT at https://github.com/settings/tokens?type=beta
|
||||
# → Only selected repos: EverShelf
|
||||
# → Permissions: Issues (Read+Write), Metadata (Read-only)
|
||||
GITHUB_ISSUE_TOKEN=
|
||||
GITHUB_REPO=dadaloop82/EverShelf
|
||||
# GitHub Error Reporting: token is hardcoded in api/index.php (same for all clients).
|
||||
# No .env entry needed — update GH_ISSUE_TOKEN constant in api/index.php to rotate.
|
||||
|
||||
Reference in New Issue
Block a user