Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Standardize SDK init errors

Aperta
#324 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
typescript

Direzione di ricerca

Inizia da flagsmith.init() e traccia ogni percorso di errore di inizializzazione e ogni chiamata a onError, inclusa la gestione delle risposte HTML grezze. Esamina la documentazione del client JavaScript e i test esistenti, quindi definisci la copertura per ogni errore Flagsmith documentato, la sua formattazione e lo stato di client.initialised dopo gli errori critici.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.initialised should be false
Lingua principale
TypeScript
Stelle
67
Fork
47
Merge medio
3g 8h
PR unite (30g)
3

Preparare l'ambiente

  • Nessun Dockerfile né file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Flagsmith/flagsmith-js-client

Tutte le issue di Flagsmith/flagsmith-js-client

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.