Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Board clone API failure is treated as a successful board response

Abierto Apto para principiantes
#8,360 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@Kumar-s75 ya está trabajando en esto.

Desde el 10/9/2026.

  • #8362 de @Kumar-s75 — abierto

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

  1. Mock or trigger a rejected POST /boards/{boardId}/clone request.
  2. Call the Pinia cloneBoard action.
  3. Observe that BoardApi.cloneBoard() returns the Axios error.
  4. Observe that the action processes it as newBoard and 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 main branch
  • 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

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de nextcloud/deck

Todos los issues de nextcloud/deck

Issues similares

Más issues de JavaScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.