[CaptainJack] "Failed to add to collection" when adding deck to collection
George Jabbour
## Problem Statement
Users encounter a "Failed to add to collection" error when attempting to add a deck to a collection. This issue may be specifically related to creating a new collection during the add-deck-to-collection flow.
## Steps to Reproduce
- Open an existing deck
- Attempt to add the deck to a collection
- During the flow, create a new collection (rather than selecting an existing one)
- Observe the "Failed to add to collection" error
## Expected Behavior
- User should be able to add a deck to an existing collection successfully
- User should be able to create a new collection and add the deck to it in a single flow
- Success confirmation should be displayed after adding
## Actual Behavior
- Error message "Failed to add to collection" is displayed
- Deck is not added to the collection
## Acceptance Criteria
- [ ] Adding a deck to an existing collection works without errors
- [ ] Creating a new collection during the add-to-collection flow works correctly
- [ ] Deck appears in the target collection after successful addition
- [ ] Appropriate success/error feedback is displayed to the user
- [ ] Edge case: Handle scenario where collection name already exists
## Questions to Clarify
- Does this error occur when adding to existing collections, or only when creating new ones?
- Are there any specific error messages in the browser console or network requests?
- Does this affect all deck types or specific ones?
---
Area:
CollectionGame:
CaptainJackType:
Bug