mirror of
https://github.com/moby/moby.git
synced 2026-07-12 10:35:14 +00:00
This code has some gnarly string-matching to detect "not found" errors returned by hcsshim. Hcsshim at some point changed this error to lowercase;6d67a30859It looks like we ran into that problem in integration tests, which was fixed inc530c9cbb0when updating hcsshim, however, it was only fixed in tests, and hiding the actual issue in our code. It looks like hcsshim has some utilities to detect error-types, such as the IsElementNotFoundError function in hcn, which is the newer API that also wraps the "HNS" service;d9a4231b9d/hcn/hcnerrors.go (L75-L77)But unfortunately, the hns API used by us, does not return typed errors, and returns HNS errors as a untyped formatted string. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>