Skip to content

add isValidationError to http action response for error handling#1650

Merged
jinhoonbang merged 3 commits intomainfrom
is-validation-error-http-action
Oct 29, 2025
Merged

add isValidationError to http action response for error handling#1650
jinhoonbang merged 3 commits intomainfrom
is-validation-error-http-action

Conversation

@jinhoonbang
Copy link
Copy Markdown
Contributor

add isValidationError to http action response for error handling

@github-actions
Copy link
Copy Markdown

👋 jinhoonbang, thanks for creating this pull request!

To help reviewers, please consider creating future PRs as drafts first. This allows you to self-review and make any final changes before notifying the team.

Once you're ready, you can mark it as "Ready for review" to request feedback. Thanks!

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Oct 28, 2025

✅ API Diff Results - No breaking changes


📄 View full apidiff report

@jinhoonbang jinhoonbang requested review from a team October 29, 2025 16:54
Comment thread pkg/types/gateway/action.go Outdated
Comment on lines 76 to 77
IsValidationError bool `json:"isValidationError,omitempty"` // indicates whether the error is a validation error (e.g. blocked HTTP header, blocked IP addresses)
StatusCode int `json:"statusCode,omitempty"` // HTTP status code
Copy link
Copy Markdown
Contributor

@jmank88 jmank88 Oct 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What makes this new field different from e.g. StatusCode == 400 Bad Request, or 4XX generally?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The distinction is that a StatusCode == 4xx indicates an error response returned from the customer’s endpoint. IsValidationError is a request blocked before it's sent to the customer's endpoint. Let me make the comment more clear here.

@jinhoonbang jinhoonbang merged commit 36ed009 into main Oct 29, 2025
22 of 24 checks passed
@jinhoonbang jinhoonbang deleted the is-validation-error-http-action branch October 29, 2025 19:40
jmank88 pushed a commit that referenced this pull request Nov 3, 2025
* add isValidationError flag to http action response for better error handling

* improve comments
jmank88 added a commit that referenced this pull request Nov 3, 2025
…) (#1679)

* add isValidationError flag to http action response for better error handling

* improve comments

Co-authored-by: jinhoonbang <jin.bang@smartcontract.com>
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.

3 participants