Skip to content

Commit 097dd5a

Browse files
mg12psafont
authored andcommitted
CP-42007: separate error msg from exception generation
Co-authored-by: Pau Ruiz Safont <[email protected]> Signed-off-by: Marcus Granado <[email protected]>
1 parent 6571347 commit 097dd5a

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

ocaml/xapi/xapi_pool.ml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3590,16 +3590,11 @@ let disable_repository_proxy ~__context ~self =
35903590
let set_uefi_certificates ~__context ~self ~value =
35913591
match !Xapi_globs.override_uefi_certs with
35923592
| false ->
3593-
raise
3594-
Api_errors.(
3595-
Server_error
3596-
( Api_errors.operation_not_allowed
3597-
, [
3598-
"Setting UEFI certificates is not possible when \
3599-
override_uefi_certs is false"
3600-
]
3601-
)
3602-
)
3593+
let msg =
3594+
"Setting UEFI certificates is not possible when override_uefi_certs is \
3595+
false"
3596+
in
3597+
raise Api_errors.(Server_error (operation_not_allowed, [msg]))
36033598
| true ->
36043599
Db.Pool.set_uefi_certificates ~__context ~self ~value ;
36053600
Helpers.call_api_functions ~__context (fun rpc session_id ->

0 commit comments

Comments
 (0)