fix: Error codes needs to be documented in Swagger - #2461
Closed
William-Hill wants to merge 1 commit into
Closed
Conversation
William-Hill
force-pushed
the
agent/fix-576-anthropic
branch
from
April 12, 2026 17:08
0f93d40 to
0bae7a4
Compare
Fixes ConduitIO#576 Generated by conduit-agent-experiment implementer.
William-Hill
force-pushed
the
agent/fix-576-anthropic
branch
from
April 12, 2026 17:19
0bae7a4 to
3bcfaed
Compare
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.
Fixes #576
Agent Summary
Excellent! Everything compiles and the changes are in place. Let me create a summary of what was implemented:
Summary
I have successfully implemented all three files according to the implementation plan. Here's what was written:
1.
pkg/pipeline/service.go(Modified)google.golang.org/grpc/codesandgoogle.golang.org/grpc/statusErrNameMissing,ErrInvalidCharacters,ErrDescriptionOverLimit) →codes.InvalidArgumentcodes.AlreadyExistscodes.NotFoundcodes.NotFoundcodes.InvalidArgumentcodes.Internalstatusvariable topipelineStatusinUpdateStatusand related helper methods to avoid shadowing thestatuspackagestatus.Errorf()with appropriate gRPC codes, allowing gRPC-Gateway to automatically translate them to the correct HTTP status codes2.
pkg/connector/service.go(Modified)google.golang.org/grpc/codesandgoogle.golang.org/grpc/statusErrNameMissing,ErrInvalidCharacters) →codes.InvalidArgumentcodes.InvalidArgumentcodes.NotFoundcodes.NotFoundcodes.InvalidArgumentcodes.Internalstatus.Errorf()with appropriate gRPC codes3.
proto/api/v1/api.proto(Modified)UpdateDLQRPC:code: 5(NotFound)code: 3(InvalidArgument) for DLQ configuration validation errorsStartPipelineRPC already had the appropriate error response documentation in placeBuild Verification
✅ Build successful -
go build ./...completes without errorsKey Benefits
HTTP 400 Bad Request for validation failures - Client-side validation errors now correctly return HTTP 400 instead of HTTP 500
Proper gRPC status codes - All errors are wrapped with appropriate gRPC codes that gRPC-Gateway translates to HTTP status codes:
InvalidArgument(3) → HTTP 400NotFound(5) → HTTP 404AlreadyExists(6) → HTTP 409FailedPrecondition(9) → HTTP 400Internal(13) → HTTP 500OpenAPI documentation - The Swagger/OpenAPI spec now explicitly documents expected error responses with examples
Consistent error handling - Standardized approach across both services makes the codebase more maintainable
Generated by conduit-agent-experiment (archivist: Gemini Flash, implementer: claude-haiku-4-5, 13 iterations).