Board clone API failure is treated as a successful board response
维护者通常 1 天内回复
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 88/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- javascript
- 领域
- frontend
调研方向
从 src/services/BoardApi.js 的第 146-159 行附近以及 src/stores/board.js 的第 180-194 行附近开始。运行或添加一个专门的单元测试,模拟被拒绝的 POST /boards/{boardId}/clone 请求,然后验证拒绝结果会到达 store action,board collection 保持不变,并且失败会暴露给调用方。
由索引模型根据 Issue 内容生成。
描述
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.
- 主要语言
- JavaScript
- 星标
- 1.4k
- 派生
- 358
- 平均合并
- 1 天 22 小时
- 30 天内合并 PR
- 101
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
nextcloud/deck 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
CSV export leaves trailing commas in tags and assigned-user fields可能已有人在做 @Kumar-s75 于 41 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 88/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
1. to develop bug
难度 2/5 1-3 小时 新手友好度 78/100
nextcloud/deck#8146 · 2 条评论 · 2 个 reaction ·
维护者通常 1 天内回复
-
Date picker should automatically open popup可能已有人在做 @theoholl 于 49 天前认领。 未关闭1. to develop enhancement
难度 2/5 1-3 小时 新手友好度 68/100
nextcloud/deck#8110 · 1 个 reaction ·
维护者通常 1 天内回复
相似的 Issue
-
docs
难度 2/5 1-3 小时 新手友好度 82/100
idean3885/claude-ops-agent#765 ·
维护者通常 1 天内回复
-
check:failed feeds:edit
难度 2/5 1-3 小时 新手友好度 62/100
iptv-org/database#38385 · 1 条评论 ·
维护者通常 6 天内回复
-
release-followup
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复
-
[BUG]: percentTotal not shown as percentage可能已有人在做 @ORITOMI 今天认领。 未关闭bug
难度 1/5 1 小时以内 新手友好度 93/100
维护者通常 2 天内回复