Vacant2333 commented on code in PR #2146:
URL:
https://github.com/apache/apisix-ingress-controller/pull/2146#discussion_r1463267844
##########
pkg/providers/translation/service.go:
##########
@@ -35,9 +35,15 @@ import (
func (t *translator) TranslateService(namespace, name, subset string, port
int32) (*apisixv1.Upstream, error) {
endpoint, err := t.EndpointLister.GetEndpoint(namespace, name)
if err != nil {
- return nil, &TranslateError{
- Field: "endpoints",
- Reason: err.Error(),
+ if k8serrors.IsNotFound(err) {
+ //Do not error wrap so that IsNotFound error can be
handled separately on upper level
+ //Reference
https://github.com/apache/apisix-ingress-controller/issues/1625
+ return nil, err
+ } else {
Review Comment:
no i think its necessay, the issue was cause by it didnt handle the error
`NotFound`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]