Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Board clone API failure is treated as a successful board response

Đang mở Phù hợp với người mới
#8,360 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@Kumar-s75 đang làm issue này rồi.

Từ ngày 10/9/2026.

  • #8362 của @Kumar-s75 — đang mở

Đá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

  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.

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

Mở trong Codespaces

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.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của nextcloud/deck

Tất cả issue của nextcloud/deck

Issue tương tự

Thêm issue về JavaScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.