Board clone API failure is treated as a successful board response
Los mantenedores suelen responder en 1 día
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 88/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- javascript
- Área
- frontend
Línea de trabajo
Comienza con src/services/BoardApi.js alrededor de las líneas 146-159 y src/stores/board.js alrededor de las líneas 180-194. Ejecuta o añade una prueba unitaria enfocada que simule una solicitud POST /boards/{boardId}/clone rechazada y, después, verifica que el rechazo llegue a la acción del store, que la colección de tableros permanezca sin cambios y que el fallo se exponga al llamador.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
How to use GitHub
- Please use the 👍 reaction to show that you are affected by the same issue.
- Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
- Subscribe to receive notifications on status change and new comments.
Describe the bug
When the board-clone request fails, BoardApi.cloneBoard() catches the Axios error and returns it instead of throwing it:
https://github.com/nextcloud/deck/blob/main/src/services/BoardApi.js#L146-L159
Returning the error resolves the promise. The Pinia action then treats that error as a successfully cloned board:
https://github.com/nextcloud/deck/blob/main/src/stores/board.js#L180-L194
Since an Axios error normally has no board id, it can be appended to this.boards. The store action's own catch block is not reached because the API method resolved with the error object.
This was found by reviewing the current main branch. A focused unit test should be sufficient to reproduce it by mocking a rejected clone request.
To Reproduce
- Mock or trigger a rejected
POST /boards/{boardId}/clonerequest. - Call the Pinia
cloneBoardaction. - Observe that
BoardApi.cloneBoard()returns the Axios error. - Observe that the action processes it as
newBoardand may append it to the board collection.
Expected behavior
A failed clone request should reject. The board collection should remain unchanged, and the caller/UI should receive the request failure.
Screenshots
Not applicable; this is an error-propagation issue found on the current main branch.
Client details:
- OS: Not environment-specific
- Browser: Not environment-specific
- Version: Current
mainbranch - Device: Desktop
Server details
Not environment-specific. The failure can be reproduced with a mocked rejected Axios request.
Logs
No server or browser logs are required when reproducing with a rejected Axios mock.
Suggested fix
Allow the Axios rejection to propagate, or rethrow the caught error:
} catch (err) {
throw err
}
A regression test should verify that a rejected clone request leaves boards unchanged and reaches the store action's error path.
- Lenguaje dominante
- JavaScript
- Estrellas
- 1.4k
- Forks
- 358
- Merge medio
- 2 d 18 h
- PR fusionados (30 d)
- 83
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Sin Dockerfile ni 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 nextcloud/deck
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
CSV export leaves trailing commas in tags and assigned-user fieldsPosiblemente ocupada @Kumar-s75 la tomó hace 38 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
nextcloud/deck#8334 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
1. to develop bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
nextcloud/deck#8146 · 2 comentarios · 2 reacciones ·
Los mantenedores suelen responder en 1 día
-
Date picker should automatically open popupPosiblemente ocupada @theoholl la tomó hace 46 días. Abierto1. to develop enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
nextcloud/deck#8110 · 1 reacción ·
Los mantenedores suelen responder en 1 día
Todos los issues de nextcloud/deck
Issues similares
-
bug lsp sev-3
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 90/100
Miaotofu01/Study-Mate#206 ·
Los mantenedores suelen responder en 1 día
-
effort:low model:light plan planner:fable-5-1 test-quality tests
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día
-
bug good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 92/100
-
[BUG][5.4.0] 网页全屏时, 不能直接切全屏Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 63/100
zhw2590582/ArtPlayer#1073 ·