ITADN

feat: enhanced MQTT error handling and reason codes

#23Pull Requestshubhamguptadream11 创建于 2025-04-27已合并
This PR introduces significant improvements to the MQTT client's error handling system, providing more detailed error information and better error categorization. **Key Changes** - Enhanced Error Event System - Added detailed error event payload with comprehensive error information - Introduced new error types and reason codes for better error categorization - Updated RN version to `0.72.9 `to fix boost lib issue in iOS. [react-native-patch-fix](https://github.com/facebook/react-native/blob/v0.72.9/packages/react-native/third-party-podspecs/boost.podspec) [This is required to build example, didn't have any impact on core logic] - Updated **java-version** to stable **build-android** check on CI. **Enhanced Mqtt5ReasonCode with specific error codes:** ``` BAD_USER_NAME_OR_PASSWORD = 134, NOT_AUTHORIZED = 135, BAD_AUTHENTICATION_METHOD = 140, NORMAL_DISCONNECTION = 0, DEFAULT = -1, CONNECTION_ERROR = -2, DISCONNECTION_ERROR = -3, SUBSCRIPTION_ERROR = -4, UNSUBSCRIPTION_ERROR = -5, INITIALIZATION_ERROR = -6, RX_CHAIN_ERROR = -7 ``` **Error Types** Added new MqttErrorType enum for error categorization: ``` INITIALIZATION = 'INITIALIZATION', CONNECTION = 'CONNECTION', SUBSCRIPTION = 'SUBSCRIPTION', UNSUBSCRIPTION = 'UNSUBSCRIPTION', DISCONNECTION = 'DISCONNECTION', GENERAL = 'GENERAL' ```
合并状态:已合并 合并于 2025-05-05 关闭于 2025-05-05 0 条评论