Improve `getResolvedSiteConfigPath` error message logic

Aperta Adatta ai principianti
#210 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
72/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Tranquilla
Stack tecnologico
typescript
Ambito
build-system

Direzione di ricerca

Inizia da tools/webpack/utils/getResolvedSiteConfigPath.ts, alle righe collegate, e segui come vengono verificati SITE_CONFIG_PATH e defaultPath. Confronta il comportamento attuale con ogni caso nella tabella dell'issue, quindi verifica che il percorso selezionato e il messaggio di errore corrispondano a tali risultati.

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

Descrizione

When SITE_CONFIG_PATH is set but invalid, it silently falls through to try the default path instead of erroring immediately.

This means for the following flows:

SITE_CONFIG_PATH defined SITE_CONFIG_PATH exists defaultPath exists Result
✅ ✅ N/A No error. Site config path returned.
✅ ❌ ✅ No error. Default path returned.
✅ ❌ ❌ Error saying env var path is invalid, no mention of default path.
❌ ❌ ✅ No error. Default path returned.
❌ ❌ ❌ Error saying default path is invalid.

The main issue here is that the error messaging doesn't accurately reflect what's happening. No mention of falling back to the default path, and only showing the env var error message when both the env var path and the default path are invalid.

https://github.com/openedx/frontend-base/blob/d511970513aabcca86a9ae71c17c18779e9b514a/tools/webpack/utils/getResolvedSiteConfigPath.ts#L21-L26

Lingua principale
TypeScript
Stelle
4
Fork
13
Merge medio
3g 5h
PR unite (30g)
4

Preparare l'ambiente

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 openedx/frontend-base

Tutte le issue di openedx/frontend-base

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.