File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -190,6 +190,7 @@ getImageManifest src = context "Getting Image Manifest" $ do
190190 (digestOf manifestIndex platformArch)
191191
192192 parseOciManifest
193+ =<< fromResponse
193194 =<< mkRequest manager (registryCred src) (Just supportedManifestKinds)
194195 =<< (manifestEndpoint $ src{registryContainerRepositoryReference = manifestDigest})
195196 else do
Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ data ContainerRegistryApiErrorKind
3939 | Denied
4040 | Unsupported
4141 | OtherError
42+ | TooManyRequests
4243 deriving (Eq , Ord )
4344
4445instance Show ContainerRegistryApiErrorKind where
@@ -49,6 +50,7 @@ instance Show ContainerRegistryApiErrorKind where
4950 show Unauthorized = " UNAUTHORIZED"
5051 show Denied = " DENIED"
5152 show Unsupported = " UNSUPPORTED"
53+ show TooManyRequests = " TOOMANYREQUESTS"
5254 show OtherError = " OTHER_UNKNOWN_ERROR"
5355
5456instance FromJSON ContainerRegistryApiErrorKind where
@@ -61,6 +63,7 @@ errCodeToErrKind errorKind | show NameInvalid == errorKind = NameInvalid
6163errCodeToErrKind errorKind | show NameUnknown == errorKind = NameUnknown
6264errCodeToErrKind errorKind | show Unauthorized == errorKind = Unauthorized
6365errCodeToErrKind errorKind | show Denied == errorKind = Denied
66+ errCodeToErrKind errorKind | show TooManyRequests == errorKind = TooManyRequests
6467errCodeToErrKind errorKind | show Unsupported == errorKind = Unsupported
6568errCodeToErrKind _ = OtherError
6669
@@ -103,7 +106,7 @@ instance ToDiagnostic UnknownApiError where
103106 let header =
104107 renderIt $
105108 vsep
106- [ " Caught unexpected error from:" <> pretty (" (" <> show (statusCode status) <> " ) " <> show uri)
109+ [ " Caught unexpected error from: " <> pretty (" (" <> show (statusCode status) <> " ) " <> show uri)
107110 ]
108111 Errata (Just header) [] Nothing
109112
You can’t perform that action at this time.
0 commit comments