api_error_monitor library
A Dart/Flutter package that automatically detects and reports API response parsing errors, including type mismatches and missing keys, with Discord webhook integration.
This package provides:
- Automatic error detection during JSON parsing
- Discord webhook integration for error reporting
- Local file logging for offline scenarios
- Support for both Dio and http packages
- Retry mechanism for failed webhook requests
- Debug mode configuration
Classes
- ApiErrorDioInterceptor
- Dio interceptor for automatically capturing API parsing errors
- ApiErrorHttpClient
- Helper class for monitoring HTTP package requests
- ApiErrorInfo
- Information extracted from an error
- ApiErrorMonitor
- Main class for monitoring and reporting API errors
- ApiErrorMonitorConfig
- Configuration for ApiErrorMonitor
- ApiErrorReport
- Model representing an API error report
- DiscordReporter
- Reporter that sends error reports to Discord webhook
- ErrorParser
- Utility class to parse error messages and extract information
- LocalFileReporter
- Reporter that saves error reports to local file
- ReporterQueue
- Queue for storing failed reports to retry later
Extensions
- DioApiErrorMonitoring on Dio
- Helper extension for Dio to easily add error monitoring