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:
Achilleas Koutsou 2022-04-14 21:13:27 +02:00 committed by Tom Gundersen
parent d0da8fd122
commit 8a23a77c5b
2 changed files with 7 additions and 2 deletions

View file

@ -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: