mirror of
https://github.com/project-zot/zot.git
synced 2026-06-16 04:17:55 +08:00
Leave zot repositories in a consistent state after zot hits fd limit closes #359
Signed-off-by: Alexei Dodon <adodon@cisco.com>
This commit is contained in:
committed by
Ramkumar Chinchani
parent
ba41368469
commit
ad519e2d3e
@@ -34,6 +34,7 @@ const (
|
||||
UNAUTHORIZED
|
||||
DENIED
|
||||
UNSUPPORTED
|
||||
INVALID_INDEX
|
||||
)
|
||||
|
||||
func (e ErrorCode) String() string {
|
||||
@@ -53,6 +54,7 @@ func (e ErrorCode) String() string {
|
||||
UNAUTHORIZED: "UNAUTHORIZED",
|
||||
DENIED: "DENIED",
|
||||
UNSUPPORTED: "UNSUPPORTED",
|
||||
INVALID_INDEX: "INVALID_INDEX",
|
||||
}
|
||||
|
||||
return errMap[e]
|
||||
@@ -152,6 +154,11 @@ func NewError(code ErrorCode, detail ...interface{}) Error { //nolint: interface
|
||||
Description: `The operation was unsupported due to a missing
|
||||
implementation or invalid set of parameters.`,
|
||||
},
|
||||
|
||||
INVALID_INDEX: {
|
||||
Message: "Invalid format of index.json file of the repo",
|
||||
Description: "index.json file does not contain data in json format",
|
||||
},
|
||||
}
|
||||
|
||||
err, ok := errMap[code]
|
||||
|
||||
Reference in New Issue
Block a user