Skip to content

Commit f2f37d7

Browse files
dumbbellthe-mikedavis
authored andcommitted
rabbit_khepri: Adapt delete_or_fail/1 to Khepri 0.17.0
If the tree node to delete does not exist, the node props map is empty.
1 parent d08a3f4 commit f2f37d7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

deps/rabbit/src/rabbit_khepri.erl

+3-1
Original file line numberDiff line numberDiff line change
@@ -1054,7 +1054,9 @@ delete_or_fail(Path) ->
10541054
0 -> {error, {node_not_found, #{}}};
10551055
_ -> ok
10561056
end;
1057-
Error ->
1057+
{ok, #{} = NodePropsMap} when NodePropsMap =:= #{} ->
1058+
{error, {node_not_found, #{}}};
1059+
{error, _} = Error ->
10581060
Error
10591061
end.
10601062

0 commit comments

Comments
 (0)