Skip to content

Commit

Permalink
CP-42007: separate error msg from exception generation
Browse files Browse the repository at this point in the history
Co-authored-by: Pau Ruiz Safont <[email protected]>
Signed-off-by: Marcus Granado <[email protected]>
  • Loading branch information
2 people authored and mg12ctx committed Feb 28, 2023
1 parent 6571347 commit 097dd5a
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions ocaml/xapi/xapi_pool.ml
Original file line number Diff line number Diff line change
Expand Up @@ -3590,16 +3590,11 @@ let disable_repository_proxy ~__context ~self =
let set_uefi_certificates ~__context ~self ~value =
match !Xapi_globs.override_uefi_certs with
| false ->
raise
Api_errors.(
Server_error
( Api_errors.operation_not_allowed
, [
"Setting UEFI certificates is not possible when \
override_uefi_certs is false"
]
)
)
let msg =
"Setting UEFI certificates is not possible when override_uefi_certs is \
false"
in
raise Api_errors.(Server_error (operation_not_allowed, [msg]))
| true ->
Db.Pool.set_uefi_certificates ~__context ~self ~value ;
Helpers.call_api_functions ~__context (fun rpc session_id ->
Expand Down

0 comments on commit 097dd5a

Please sign in to comment.