forked from cloudflare/serverless-registry
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request cloudflare#32 from cloudflare/gv/correct-manifest-…
…unknown fix: return a response that docker understands better when it doesn't find a manifest
- Loading branch information
Showing
4 changed files
with
28 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,24 @@ | ||
export const ManifestUnknownError = { | ||
errors: [ | ||
{ | ||
code: "MANIFEST_UNKNOWN", | ||
message: "manifest unknown", | ||
detail: "This error is returned when the manifest, identified by name and tag is unknown to the repository.", | ||
}, | ||
], | ||
}; | ||
export const ManifestUnknownError = (tag: string) => | ||
({ | ||
errors: [ | ||
{ | ||
code: "MANIFEST_UNKNOWN", | ||
message: "manifest unknown", | ||
detail: { | ||
Tag: tag, | ||
}, | ||
}, | ||
], | ||
} as const); | ||
|
||
export const BlobUnknownError = { | ||
errors: [ | ||
{ | ||
code: "BLOB_UNKNOWN", | ||
message: "blob unknown to registry", | ||
detail: "This error may be returned when a manifest blob is unknown to the registry.", | ||
detail: { | ||
message: "This error may be returned when a layer blob is unknown to the registry.", | ||
}, | ||
}, | ||
], | ||
}; |