-
Notifications
You must be signed in to change notification settings - Fork 44
Standardize SDK init errors #324
Copy link
Copy link
Open
Description
Error handling and onError calls during SDK initialization (flagsmith.init()) are currently inconsistent. Some are plain Error objects, others are raw strings unparsed HTML responses.
E.g
<!DOCTYPE html>
...
<title>Error</title>
...
<pre>Cannot POST /test/identities/</pre>
...
Standardize the errors, by having a FlagsmithError subclass for example would help handling them in a more programmatic way.
DoD
- Each path in init throws its own specific error
- A new section in the javascript client documentation describes all the possible errors
- For each Flagsmith error, the tests should be able to confirm the error is caught, thrown and formatted as described per the decoumentation
- If a critical error happens,
client.initialisedshould be false
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels