MCPcopy Create free account
hub / github.com/google/go-cloud / equivalentError

Function equivalentError

runtimevar/awsparamstore/awsparamstore.go:224–231  ·  view source on GitHub ↗

equivalentError returns true iff err1 and err2 represent an equivalent error; i.e., we don't want to return it to the user as a different error.

(err1, err2 error)

Source from the content-addressed store, hash-verified

222// equivalentError returns true iff err1 and err2 represent an equivalent error;
223// i.e., we don't want to return it to the user as a different error.
224func equivalentError(err1, err2 error) bool {
225 if err1 == err2 || err1.Error() == err2.Error() {
226 return true
227 }
228 code1 := getErrorCode(err1)
229 code2 := getErrorCode(err2)
230 return code1 != "" && code1 == code2
231}
232
233type watcher struct {
234 // client is the client to use.

Callers 1

errorStateFunction · 0.70

Calls 2

getErrorCodeFunction · 0.70
ErrorMethod · 0.45

Tested by

no test coverage detected