Implement robust error handling and configuration for Logistics API interactions
- Introduced `LogisticsApiException` to handle connection and request errors with user-friendly messages in French. - Updated `LogisticsService` to include configurable timeout, connection timeout, retry attempts, and sleep duration for retries. - Enhanced error handling in Filament pages to catch `LogisticsApiException` and provide clear feedback to users. - Updated `.env` and `config/logistics.php` to support new configuration options. - Added logging for failed API requests in `api_request_logs`. - Created comprehensive API documentation for Logistics endpoints.
This commit is contained in:
@@ -67,3 +67,7 @@ VITE_APP_NAME="${APP_NAME}"
|
||||
# LOGISTICS_API_BASE_URL=
|
||||
# LOGISTICS_API_KEY=
|
||||
# LOGISTICS_API_FOLDER=
|
||||
# LOGISTICS_API_TIMEOUT=30
|
||||
# LOGISTICS_API_CONNECT_TIMEOUT=10
|
||||
# LOGISTICS_API_RETRY_TIMES=3
|
||||
# LOGISTICS_API_RETRY_SLEEP_MS=500
|
||||
|
||||
Reference in New Issue
Block a user