Cloud API: add error for failed customization validation
Add new error `ErrorInvalidCustomization` used in situations when the user-provided customization values don't pass validation. This will be used by the Directory / File customization. Signed-off-by: Tomáš Hozza <thozza@redhat.com>
This commit is contained in:
parent
ffd0bdb7ad
commit
15f1962c34
1 changed files with 2 additions and 0 deletions
|
|
@ -45,6 +45,7 @@ const (
|
|||
ErrorUnsupportedImage ServiceErrorCode = 32
|
||||
ErrorInvalidImageFromComposeId ServiceErrorCode = 33
|
||||
ErrorImageNotFound ServiceErrorCode = 34
|
||||
ErrorInvalidCustomization ServiceErrorCode = 35
|
||||
|
||||
// Internal errors, these are bugs
|
||||
ErrorFailedToInitializeBlueprint ServiceErrorCode = 1000
|
||||
|
|
@ -120,6 +121,7 @@ func getServiceErrors() serviceErrors {
|
|||
serviceError{ErrorUnsupportedImage, http.StatusBadRequest, "This compose doesn't support the creation of multiple images"},
|
||||
serviceError{ErrorInvalidImageFromComposeId, http.StatusBadRequest, "Invalid format for image id"},
|
||||
serviceError{ErrorImageNotFound, http.StatusBadRequest, "Image with given id not found"},
|
||||
serviceError{ErrorInvalidCustomization, http.StatusBadRequest, "Invalid image customization"},
|
||||
|
||||
serviceError{ErrorFailedToInitializeBlueprint, http.StatusInternalServerError, "Failed to initialize blueprint"},
|
||||
serviceError{ErrorFailedToGenerateManifestSeed, http.StatusInternalServerError, "Failed to generate manifest seed"},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue