Board clone API failure is treated as a successful board response
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 88/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- javascript
- Lĩnh vực
- frontend
Hướng nghiên cứu
Bắt đầu với src/services/BoardApi.js quanh các dòng 146-159 và src/stores/board.js quanh các dòng 180-194. Chạy hoặc thêm một unit test tập trung mô phỏng một yêu cầu POST /boards/{boardId}/clone bị từ chối, sau đó xác minh rằng việc từ chối đến được store action, collection board vẫn không thay đổi và lỗi được thông báo cho caller.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- JavaScript
- Star
- 1.4k
- Fork
- 358
- Merge trung bình
- 2 ngày 18 giờ
- Pull request đã merge (30 ngày)
- 83
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của nextcloud/deck
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
CSV export leaves trailing commas in tags and assigned-user fieldsCó thể đã có người làm @Kumar-s75 đã nhận 38 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
nextcloud/deck#8334 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
1. to develop bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
nextcloud/deck#8146 · 2 bình luận · 2 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Date picker should automatically open popupCó thể đã có người làm @theoholl đã nhận 46 ngày trước. Đang mở1. to develop enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
nextcloud/deck#8110 · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của nextcloud/deck
Issue tương tự
-
bug lsp sev-3
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 90/100
Miaotofu01/Study-Mate#206 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
effort:low model:light plan planner:fable-5-1 test-quality tests
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 92/100
-
[BUG][5.4.0] 网页全屏时, 不能直接切全屏Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 63/100
zhw2590582/ArtPlayer#1073 ·