## 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
  1. Open an existing deck
  2. Attempt to add the deck to a collection
  3. During the flow, create a new collection (rather than selecting an existing one)
  4. 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
  1. Does this error occur when adding to existing collections, or only when creating new ones?
  2. Are there any specific error messages in the browser console or network requests?
  3. Does this affect all deck types or specific ones?
---
Area:
Collection
Game:
CaptainJack
Type:
Bug