saveProject throws an error when a network request fails
I maintainer di solito rispondono entro 3 giorni
@dyk1454683243-sudo ci sta già lavorando.
Dal 2/10/2026.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 78/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- javascript
Direzione di ricerca
Inizia dal punto di ingresso saveProject() e dal gestore catch di apiClient.put() mostrato nell’issue. Riproduci il fallimento facendo fallire la richiesta senza una risposta HTTP, quindi verifica che la gestione esistente del fallimento del salvataggio venga eseguita senza una rejection non gestita né un TypeError secondario.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
p5.js version
2.3.2
What is your operating system?
Linux
Web browser and version
firefox 153.0.1
Actual Behavior
When saving a project, if the request fails because of a network error, saveProject() throws a TypeError instead of handling the save failure normally.
the error is:
Cannot read properties of undefined (reading 'status')
this happens because the error handler assumes error.response always exists, but for network errors there is no response.
Expected Behavior
A network error while saving should be handled as a normal save failure without throwing another error.
The user should get the usual save failure handling instead of an unhandled/rejected promise.
Steps to reproduce
Steps:
- open an existing saved project and make some changes.
- disconnect the network or otherwise make the api request fail without returning an http response.
- try to save the project.
- saveProject() rejects with:
Cannot read properties of undefined (reading 'status')
Snippet:
apiClient
.put(`/projects/${state.project.id}`, formParams)
.catch((error) => {
const { response } = error;
if (response.status === 403) {
// ...
}
});
for a network error, error.response is undefined, so accessing response.status throws.
a possible fix would be to check whether response exists before accessing response.status, and handle network errors as a normal save failure.
- Lingua principale
- JavaScript
- Stelle
- 1.7k
- Fork
- 1.7k
- Merge medio
- 3g 18h
- PR unite (30g)
- 7
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Ha un 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 processing/p5.js-web-editor
-
`PATCH /editor/project/visibility` returns 200 with `null` and doesn't update when `projectId` is a slugForse già presa @Prbhtsgh l’ha presa oggi. ApertaAwaiting Maintainer Approval Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
processing/p5.js-web-editor#4348 · 3 commenti ·
I maintainer di solito rispondono entro 3 giorni
-
Fix: example.js stores defaultHTML function reference instead of calling it, causing examples to display raw JavaScript source in previewForse già presa @syedbarkath980 l’ha presa 4 giorni fa. ApertaAwaiting Maintainer Approval Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
processing/p5.js-web-editor#4344 · 1 commento ·
I maintainer di solito rispondono entro 3 giorni
-
signup form gets stuck when signup request fails due to network errorForse già presa @PS01K l’ha presa 34 giorni fa. ApertaAwaiting Maintainer Approval Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
processing/p5.js-web-editor#4285 · 3 commenti ·
I maintainer di solito rispondono entro 3 giorni
-
Awaiting Maintainer Approval Enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
processing/p5.js-web-editor#4270 · 1 commento ·
I maintainer di solito rispondono entro 3 giorni
-
"Add Sketch" option visible to guest users on other users collectionsForse già presa @Riddh1ma l’ha presa 122 giorni fa. ApertaBug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
processing/p5.js-web-editor#4148 ·
I maintainer di solito rispondono entro 3 giorni
Tutte le issue di processing/p5.js-web-editor
Issue simili
-
ci-install-db-tools stall-case tests flake: stalled apt-get can be killed before it logs its callApertaeffort:low model:light plan planner:opus-5-5 tests
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
I maintainer di solito rispondono entro 1 giorno
-
Bug 🐞
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
mozilla-mobile/firefox-ios#35986 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
-
bug(sight): the dashboard's text truncations split surrogate pairs and show broken charactersApertacomponent:sight
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
agentic-os-org/ANOLISA#6738 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
bug Durable Agents Observability (AI Telemetry) status: needs triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
mastra-ai/mastra#26470 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno