You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 29, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,10 @@
2
2
3
3
All notable changes to the LaunchDarkly React Native SDK will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org).
4
4
5
+
## [4.0.3] - 2021-04-28
6
+
### Fixed:
7
+
- The `LDEvaluationReasonErrorKind`, `LDEvaluationReasonKind`, `LDConnectionMode`, and `LDFailureReason` enum TypeScript types were undefined when evaluated at runtime due to being defined in an ambient context.
8
+
5
9
## [4.0.2] - 2021-04-23
6
10
### Fixed:
7
11
- Android: Fixed an issue where the `jsonVariationDetail` method in `LDClient` returned `Promise<Record<string, any>>` instead of the declared return type of `Promise<LDEvaluationDetail<Record<string, any>>>`.
* The flag could not be evaluated, so the default value was returned.
473
328
*/
474
329
exporttypeLDEvaluationReasonError={
475
-
kind: LDEvaluationReasonKind.ERROR;
330
+
kind: 'ERROR';
476
331
477
332
/**
478
333
* The kind of error which occurred.
334
+
*
335
+
* Kinds of errors include:
336
+
*
337
+
* - `'CLIENT_NOT_READY'`: The client is not able to establish a connection to LaunchDarkly yet. If there is a persistent feature store, the store does not yet contain flag data.
338
+
* - `'FLAG_NOT_FOUND'`: The flag key did not match any known flag.
339
+
* - `'USER_NOT_SPECIFIED'`: The user object or user key was not provided.
340
+
* - `'MALFORMED_FLAG'`: There was an internal inconsistency in the flag data. For example, a rule specified a nonexistent variation. This is an unusual condition that might require assistance from LaunchDarkly's Support team.
341
+
* - `'WRONG_TYPE'`: The application code requested the flag value with a different data type than it actually is. For example, the code asked for a boolean when the flag type is actually a string.
342
+
* - `'EXCEPTION'`: An unexpected error stopped flag evaluation. This could happen if you are using a persistent feature store and the database stops working. When this happens, the SDK always prints the specific error to the log.
* Returns the current state of the connection to LaunchDarkly.
721
+
*
722
+
* States include:
857
723
*
724
+
* - `'STREAMING'`: The SDK is either connected to the flag stream, or is actively attempting to acquire a connection.
725
+
* - `'POLLING'`: The SDK was configured with streaming disabled, and is in foreground polling mode.
726
+
* - `'BACKGROUND_POLLING'`: (Android specific enum value) The SDK has detected the application is in the background and has transitioned to battery conscious background polling.
727
+
* - `'BACKGROUND_DISABLED'`: (Android specific enum value) The SDK was configured with background polling disabled. The SDK has detected the application is in the background and is not attempting to update the flag cache.
728
+
* - `'OFFLINE'`: The SDK has detected that the mobile device does not have an active network connection so has ceased flag update attempts until the network status changes.
729
+
* - `'SET_OFFLINE'`: (Android specific enum value) The SDK has been explicitly set offline, either in the initial configuration, by setOffline(), or as a result of failed authentication to LaunchDarkly. The SDK will stay offline unless setOnline() is called.
730
+
* - `'SHUTDOWN'`: (Android specific enum value) The shutdown state indicates the SDK has been permanently shutdown as a result of a call to close().
731
+
* - `'ESTABLISHING_STREAMING_CONNECTION'`: (iOS specific enum value) The SDK is attempting to connect to LaunchDarkly by streaming.
732
+
*
858
733
* @returns
859
734
* A promise containing a LDConnectionMode enum value representing the status of the connection to LaunchDarkly.
* Returns the most recent connection failure reason or null.
760
+
*
761
+
* Reasons include:
885
762
*
763
+
* - `'NONE'`: This indicates when no error has been recorded.
764
+
* - `'UNKNOWN_ERROR'`: This indicates when there is an internal error in the stream request.
765
+
* - `'UNAUTHORIZED'`: (iOS specific enum value) This indicates when an incorrect mobile key is provided.
766
+
* - `'HTTP_ERROR'`: (iOS specific enum value) This indicates when an error with an HTTP error code is present.
767
+
* - `'UNEXPECTED_RESPONSE_CODE'`: (Android specific enum value) This indicates the LDFailure is an instance of LDInvalidResponseCodeFailure. See Android documentation for more details.
768
+
* - `'UNEXPECTED_STREAM_ELEMENT_TYPE'`: (Android specific enum value) An event was received through the stream was had an unknown event name. This could indicate a newer SDK is available if new event types have become available through the flag stream since the SDKs release.
769
+
* - `'NETWORK_FAILURE'`: (Android specific enum value) A network request for polling, or the EventSource stream reported a failure.
770
+
* - `'INVALID_RESPONSE_BODY'`: (Android specific enum value) A response body received either through polling or streaming was unable to be parsed.
771
+
*
886
772
* @returns
887
773
* A promise containing a LDFailureReason enum value representing the reason for the most recently failed
888
774
* connection to LaunchDarkly, or null if a failed connection has yet to occur.
0 commit comments