Skip to content

Commit 3e9b4a5

Browse files
MB-61292: Add formatting for encr at rest errors
Change-Id: I86c81acaf15b74512be9c13aa825e67d54919750 Reviewed-on: https://review.couchbase.org/c/ns_server/+/232627 Tested-by: Timofey Barmin <[email protected]> Reviewed-by: Navdeep S Boparai <[email protected]> Well-Formed: Build Bot <[email protected]>
1 parent e081f30 commit 3e9b4a5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

apps/ns_server/src/cb_cluster_secrets.erl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4068,8 +4068,8 @@ log_succ_kek_rotation(Id, Name, IsAutomatic) ->
40684068
{is_automatic, IsAutomatic}]).
40694069

40704070
log_unsucc_kek_rotation(Id, Name, Reason, IsAutomatic) ->
4071-
ale:error(?USER_LOGGER, "KEK rotation failed for ~s (id ~p): ~p",
4072-
[Name, Id, Reason]),
4071+
ale:error(?USER_LOGGER, "KEK rotation failed for ~s (id ~p): ~s",
4072+
[Name, Id, menelaus_web_secrets:format_error(Reason)]),
40734073
event_log:add_log(encryption_key_rotation_failed,
40744074
[{encryption_key_id, Id},
40754075
{encryption_key_name, iolist_to_binary(Name)},
@@ -4085,8 +4085,8 @@ log_unsucc_dek_rotation(Kind, Reason) ->
40854085
DataTypeName = try cb_deks:kind2datatype(Kind)
40864086
catch error:not_found -> <<"unknown">>
40874087
end,
4088-
ale:error(?USER_LOGGER, "DEK rotation failed for ~s: ~p",
4089-
[DataTypeName, Reason]),
4088+
ale:error(?USER_LOGGER, "DEK rotation failed for ~s: ~s",
4089+
[DataTypeName, menelaus_web_secrets:format_error(Reason)]),
40904090
event_log:add_log(encr_at_rest_dek_rotation_failed,
40914091
[{kind, cb_deks:kind2bin(Kind, <<"unknown">>)},
40924092
{reason, format_failure_reason(Reason)}]).

0 commit comments

Comments
 (0)