Skip to content

Conversation

@leggetter
Copy link
Collaborator

  • Added destinationURL and destinationCliPath to hasAnyDestinationFlag() check
  • Added destinationURL and destinationCliPath to hasDestinationConfigOnly check
  • Added destinationURL and destinationCliPath to hasDestinationConfigUpdate check
  • Added destinationCliPath handling in buildDestinationInputForUpdate()
  • Added comprehensive test suite for partial updates (TestConnectionUpsertPartialUpdates)

This fixes the 422 error when running:
hookdeck connection upsert --destination-url

Previously, the CLI wasn't detecting that destination config flags were provided,
so it didn't fetch the existing connection to preserve source/destination references.
The API requires both source and destination in every PUT request, so the CLI now
automatically handles this by fetching the existing connection and merging changes.

- Added destinationURL and destinationCliPath to hasAnyDestinationFlag() check
- Added destinationURL and destinationCliPath to hasDestinationConfigOnly check
- Added destinationURL and destinationCliPath to hasDestinationConfigUpdate check
- Added destinationCliPath handling in buildDestinationInputForUpdate()
- Added comprehensive test suite for partial updates (TestConnectionUpsertPartialUpdates)

This fixes the 422 error when running:
  hookdeck connection upsert <name> --destination-url <URL>

Previously, the CLI wasn't detecting that destination config flags were provided,
so it didn't fetch the existing connection to preserve source/destination references.
The API requires both source and destination in every PUT request, so the CLI now
automatically handles this by fetching the existing connection and merging changes.
@leggetter leggetter merged commit 9089183 into feat/local-flag Nov 21, 2025
1 check passed
@leggetter leggetter deleted the fix/conn-upsert branch November 21, 2025 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants