saveProject throws an error when a network request fails
Los mantenedores suelen responder en 4 días
@dyk1454683243-sudo ya está trabajando en esto.
Desde el 2/10/2026.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 78/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- javascript
Línea de trabajo
Empieza en el punto de entrada saveProject() y en el manejador catch de apiClient.put() mostrado en el issue. Reproduce el fallo haciendo que la solicitud falle sin una respuesta HTTP y, a continuación, verifica que el manejo existente del fallo de guardado se ejecute sin una rejection no controlada ni un TypeError secundario.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- JavaScript
- Estrellas
- 1.7k
- Forks
- 1.7k
- Merge medio
- 8 d 22 h
- PR fusionados (30 d)
- 14
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de processing/p5.js-web-editor
-
Unable to rename sound filesPosiblemente ocupada @prithq la tomó hace 3 días. AbiertoAwaiting Maintainer Approval Bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
processing/p5.js-web-editor#4392 · 2 comentarios ·
Los mantenedores suelen responder en 4 días
-
Renaming a folder doubles the folder name in file paths (console errors show /lib/lib/helper.js)AbiertoAwaiting Maintainer Approval Bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
processing/p5.js-web-editor#4365 · 1 comentario ·
Los mantenedores suelen responder en 4 días
-
p5 logo is broken on verification emailsPosiblemente ocupada @sourabh65mehta la tomó hace 18 días. AbiertoBug
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
processing/p5.js-web-editor#4364 · 2 comentarios · 1 asignado ·
Los mantenedores suelen responder en 4 días
-
`PATCH /editor/project/visibility` returns 200 with `null` and doesn't update when `projectId` is a slugQuizá libre de nuevo @Prbhtsgh la tomó hace 25 días y no hay ningún pull request abierto. AbiertoAwaiting Maintainer Approval Bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
processing/p5.js-web-editor#4348 · 3 comentarios ·
Los mantenedores suelen responder en 4 días
-
Fix: example.js stores defaultHTML function reference instead of calling it, causing examples to display raw JavaScript source in previewPosiblemente ocupada @syedbarkath980 la tomó hace 3 días. AbiertoBug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
processing/p5.js-web-editor#4344 · 3 comentarios · 1 asignado ·
Los mantenedores suelen responder en 4 días
Todos los issues de processing/p5.js-web-editor
Issues similares
-
bug confirmed js v6
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
BUG
Dificultad 1/5 1-3 horas Aptitud para principiantes 90/100
linuxmint/cinnamon-spices-applets#9223 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
fastify/fastify-swagger-ui#299 ·