Use strongerrors in provider implementations. (#403)
This ensures that we can catch certain types of errors from providers and handle accordingly in the core. There is still more to do here to improve that but this resolves an immediate need to know why a Delete failed. vic provider was not updated since I could not figure out where to get this information.
This commit is contained in:
@@ -10,6 +10,7 @@ import (
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/service/cloudwatchlogs"
|
||||
"github.com/aws/aws-sdk-go/service/ecs"
|
||||
"github.com/cpuguy83/strongerrors"
|
||||
k8sTypes "k8s.io/apimachinery/pkg/types"
|
||||
)
|
||||
|
||||
@@ -272,7 +273,7 @@ func (c *Cluster) GetPod(namespace string, name string) (*Pod, error) {
|
||||
tag := buildTaskDefinitionTag(c.name, namespace, name)
|
||||
pod, ok := c.pods[tag]
|
||||
if !ok {
|
||||
return nil, fmt.Errorf("pod %s/%s is not found", namespace, name)
|
||||
return nil, strongerrors.NotFound(fmt.Errorf("pod %s/%s is not found", namespace, name))
|
||||
}
|
||||
|
||||
return pod, nil
|
||||
|
||||
Reference in New Issue
Block a user