Skip to content

Commit 82c6071

Browse files
chore: updating identify code documentation (#129)
Explaining the failure case of identify better. --------- Co-authored-by: Alan Barker <[email protected]>
1 parent 381378f commit 82c6071

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

typings.d.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1071,6 +1071,13 @@ export interface LDPlugin {
10711071
* Changing the current context also causes all feature flag values to be reloaded. Until that has
10721072
* finished, calls to {@link variation} will still return flag values for the previous context. You can
10731073
* use a callback or a Promise to determine when the new flag values are available.
1074+
*
1075+
* It is possible that the identify call will fail. In that case, when using a callback, the callback will receive
1076+
* an error value. While the SDK will continue to function, the developer will need to be aware that
1077+
* calls to {@link variation} will still return flag values for the previous context.
1078+
*
1079+
* When using a promise, it is important that you handle the rejection case;
1080+
* otherwise it will become an unhandled Promise rejection, which is a serious error on some platforms.
10741081
*
10751082
* @param context
10761083
* The context properties. Must contain at least the `key` property.

0 commit comments

Comments
 (0)