fix: address code review findings from gateway commands PR#219
Merged
fix: address code review findings from gateway commands PR#219
Conversation
- Add missing ValidateAPIKey() checks in connection enable/disable/pause/unpause commands - Add structured APIError type for proper 404 detection in resolve functions - Normalise success checkmark to shared SuccessCheck constant - Add labels to event list text output (Status, Connection) - Fix redundant nil check in resolveSourceID Closes #217 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This was referenced Feb 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes issues identified during code review of #213 (gateway resource management commands):
ValidateAPIKey()checks toconnection enable,connection disable,connection pause, andconnection unpausecommands — these were the only gateway commands missing the standard guardresolveSourceID,resolveDestinationID,resolveTransformationID, andresolveConnectionIDwith a properAPIErrortype andIsNotFoundError()helperSuccessCheckconstant inhelptext.goand replaced all 26 inline checkmark literals across source, destination, transformation, and connection commandsStatus:andConnection:labels to the text output inevent listfor readabilityresult.Models == nil || len(result.Models) == 0tolen(result.Models) == 0inresolveSourceIDCloses #217
Test plan
go build ./...— compiles cleanlygo vet ./...— no new warningsgo test ./pkg/...— unit tests pass (pre-existingTestSourceCreateRequiresNamefailure unrelated)go test ./test/acceptance/...— 60+ acceptance tests pass covering sources, destinations, connections, transformations, events, requests, and attempts🤖 Generated with Claude Code