Skip to content

Commit

Permalink
Recognize invalid input as a buildplanner error response.
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchell-as committed Dec 23, 2024
1 parent 6054081 commit f34443f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion pkg/platform/api/buildplanner/response/shared.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ func IsErrorResponse(errorType string) bool {
errorType == types.MergeConflictErrorType ||
errorType == types.RevertConflictErrorType ||
errorType == types.CommitNotInTargetHistoryErrorType ||
errorType == types.ComitHasNoParentErrorType
errorType == types.CommitHasNoParentErrorType ||
errorType == types.InvalidInputErrorType
}

// NotFoundError represents an error that occurred because a resource was not found.
Expand Down
3 changes: 2 additions & 1 deletion pkg/platform/api/buildplanner/types/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ const (
MergeConflictErrorType = "MergeConflict"
RevertConflictErrorType = "RevertConflict"
CommitNotInTargetHistoryErrorType = "CommitNotInTargetHistory"
ComitHasNoParentErrorType = "CommitHasNoParent"
CommitHasNoParentErrorType = "CommitHasNoParent"
TargetNotFoundErrorType = "TargetNotFound"
InvalidInputErrorType = "InvalidInput"
)

0 comments on commit f34443f

Please sign in to comment.