weldr: change all OSTree related error IDs to OSTreeOptionsError

These will all be reported from the same validation function.
This commit is contained in:
Achilleas Koutsou 2022-01-14 19:57:00 +01:00 committed by Ondřej Budai
parent 26468315ab
commit 4d31c8e69d
2 changed files with 4 additions and 4 deletions

View file

@ -2229,7 +2229,7 @@ func (api *API) composeHandler(writer http.ResponseWriter, request *http.Request
cr.OSTree.Ref = imageType.OSTreeRef()
} else if !ostree.VerifyRef(cr.OSTree.Ref) {
errors := responseError{
ID: "InvalidChars",
ID: "OSTreeOptionsError",
Msg: "Invalid ostree ref",
}
statusResponseError(writer, http.StatusBadRequest, errors)
@ -2278,7 +2278,7 @@ func (api *API) composeHandler(writer http.ResponseWriter, request *http.Request
parent, err = ostree.ResolveRef(cr.OSTree.URL, cr.OSTree.Ref)
if err != nil {
errors := responseError{
ID: "OSTreeCommitError",
ID: "OSTreeOptionsError",
Msg: err.Error(),
}
statusResponseError(writer, http.StatusBadRequest, errors)