Merged
Conversation
1af8911 to
d3f2f7e
Compare
fa9a8f9 to
670f972
Compare
1f9b253 to
8d0cd4d
Compare
670f972 to
1c3be21
Compare
8d0cd4d to
70afbc3
Compare
1c3be21 to
1e7a582
Compare
70afbc3 to
9abe765
Compare
tsivaprasad
reviewed
Jun 13, 2025
| return nil, fmt.Errorf("%w: %s", ErrNodeNotInDBSpec, name) | ||
| } | ||
|
|
||
| func (s *Spec) ValidateNodeNames(names ...string) error { |
Contributor
There was a problem hiding this comment.
We can return early if names count is 0 ?
Member
Author
There was a problem hiding this comment.
I appreciate that you're looking out for performance, but I don't think these types of micro-optimizations are all that helpful. The way that our business rules work, this should never be called with an empty list of names. In the off-chance that we change those rules so that it does become possible, the impact on overall performance is negligible. If an empty list would produce an error condition, I would feel differently, but in this case the function would still perform as expected.
9abe765 to
f3cc418
Compare
Adds an `APIError` type to our API spec and modifies our error handling code to return the new error type. In this commit, requests to nonexistent routes will still return the generic Goa error type. This will change in a subsequent commit. PLAT-86
f3cc418 to
692fb66
Compare
tsivaprasad
approved these changes
Jun 13, 2025
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.
Adds an
APIErrortype to our API spec and modifies our error handling code to return the new error type.In this commit, requests to nonexistent routes will still return the generic Goa error type. This will change in a subsequent commit.
PLAT-86