Expired sessions are not handled, and eight copies of the request helper have drifted apart
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 43/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- python, react, typescript
- Ambito
- authentication, backend-api-design, frontend, testing
Direzione di ricerca
Start with the eight request helpers and app/src/lib/query/client.ts; trace how each screen handles write permissions and how sign-in accepts a return address. Then map the helpers and screens that need consolidation, and check how the project tests API requests and permissions. Done means one shared typed helper is used everywhere, 4xx responses are not retried, expired sessions redirect to sign-in, write controls respect the shared permission check, and tests cover 401 redirects and 204 responses.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Found in the 2026-11-29 whole-repo review. Reported by a reviewer from reading the code.
Problem
Each area of the app has its own copy of the "call our API" helper (connectionFetch, associationFetch, processFetch, extensionFetch, cubeFetch, settingsFetch, two apiFetch), each with its own error type. They differ: three try to parse a body on an empty (204) response; one drops the error code and does not send cookies. None handles a 401, and the query client retries every error once, including 4xx (app/src/lib/query/client.ts).
How it goes wrong
When a session expires mid-edit every request fails with "Request failed: 401" and nothing sends the user to sign in again.
Related UX gap: product, item and extension screens show create/edit/delete buttons to users whose role cannot write (other screens hide them), so they fill in a form and get refused on submit.
Suggested fix
One shared helper with a typed error; no retry on 4xx; on 401 redirect to sign-in with a return address; one shared "can this user write" hook used on every screen.
Acceptance criteria
- One helper, used everywhere; test for the 401 redirect and the 204 case
- Lingua principale
- Python
- Stelle
- 0
- Fork
- 2
- Merge medio
- 8h 26m
- PR unite (30g)
- 47
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di TechTraverse/stac-higher
-
ci
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
TechTraverse/stac-higher#261 ·
I maintainer di solito rispondono entro 1 giorno
-
ready
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
TechTraverse/stac-higher#258 ·
I maintainer di solito rispondono entro 1 giorno
-
Error messages hide the server's reason: users see only '400 Bad Request'Forse già presa @aman-code-io l’ha presa 3 giorni fa. Apertabug good first issue ready
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
TechTraverse/stac-higher#232 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
TechTraverse/stac-higher#225 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
TechTraverse/stac-higher#216 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di TechTraverse/stac-higher
Issue simili
-
docs(contributing): the two things that silently block a PRForse già presa Una pull request collegata a questa issue è aperta o già unita. Apertaavailable documentation good first issue
Difficoltà 1/5 1-3 ore Idoneità per principianti 95/100
Nixitov/Riptide-Native#944 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
JTHCode/secretguard#24 ·
I maintainer di solito rispondono entro 1 giorno
-
area: middleware documentation good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
-
enhancement good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno
-
good first issue
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 95/100
omarelshamy25x/shamy-hijri#63 ·
I maintainer di solito rispondono entro 1 giorno