Skip to content
This repository was archived by the owner on May 30, 2024. It is now read-only.
This repository was archived by the owner on May 30, 2024. It is now read-only.

Method LaunchDarkly.init blows up when the user provides an invalid key #288

@jpinho

Description

@jpinho

Describe the bug
The method LaunchDarkly.init blows up when the user provides an invalid key.

To reproduce
Call LaunchDarkly.init with an invalid key.

Expected behavior
As a FF SDK I would expect the SDK to never blow up. Instead the init method should return a client with a failure state, that can be check unattended. Example below:

const client = LaunchDarkly.init()

client.initialized() => false
client.getStatus() => { initialized: false, initError: 'invalid SDK key', connectionEstablished: true }

I can provide a contribution, if we have an agreement here.

Logs

    error: [LaunchDarkly] Authentication failed. Double check your SDK key.
    error: [LaunchDarkly] Received error 401 (invalid SDK key) for streaming request - giving up permanently

SDK version

"launchdarkly-node-server-sdk": "^7.0.3",

Language version, developer tools

  • node 18

OS/platform

  • macOS

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions