-
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.
ociregistry/ociserver: allow customization of error responses
Currently there is no way to fully customize the errors sent by the `ociserver` implementation. This change allows that possibility by providing `ociserver.Options.WriteError`, giving the user complete flexibility in that respect. It's still possible to access the default implementation by invoking `ociregistry.WriteError` or `ociregistry.MarshalError` directly, allowing a simple way of adding functionality to the error marshaling logic without the need to rewrite the whole thing. Signed-off-by: Roger Peppe <rogpeppe@gmail.com> Change-Id: Ic680283a29a29461613c8d46d9f212400922d488 Dispatch-Trailer: {"type":"trybot","CL":1192981,"patchset":1,"ref":"refs/changes/81/1192981/1","targetBranch":"main"}
- Loading branch information
1 parent
a39bec0
commit e27348f
Showing
4 changed files
with
38 additions
and
9 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