worker: add new error type for RepoError
dnf-json now returns a new error kind: RepoError Add it to the list of known error types and handle it in the worker.
This commit is contained in:
parent
d0da8fd122
commit
8a23a77c5b
2 changed files with 7 additions and 2 deletions
|
|
@ -26,6 +26,7 @@ const (
|
|||
ErrorDNFOtherError ClientErrorCode = 22
|
||||
ErrorRPMMDError ClientErrorCode = 23
|
||||
ErrorEmptyPackageSpecs ClientErrorCode = 24
|
||||
ErrorDNFRepoError ClientErrorCode = 25
|
||||
)
|
||||
|
||||
type ClientErrorCode int
|
||||
|
|
@ -57,6 +58,8 @@ func GetStatusCode(err *Error) StatusCode {
|
|||
return JobStatusUserInputError
|
||||
case ErrorDNFMarkingErrors:
|
||||
return JobStatusUserInputError
|
||||
case ErrorDNFRepoError:
|
||||
return JobStatusInternalError
|
||||
case ErrorNoDynamicArgs:
|
||||
return JobStatusUserInputError
|
||||
case ErrorInvalidTargetConfig:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue