diff --git a/lib/stdlib/src/erl_stdlib_errors.erl b/lib/stdlib/src/erl_stdlib_errors.erl index 8105be712b8c..b5864c471f06 100644 --- a/lib/stdlib/src/erl_stdlib_errors.erl +++ b/lib/stdlib/src/erl_stdlib_errors.erl @@ -269,6 +269,9 @@ format_maps_error(take, _Args) -> [[], not_map]; format_maps_error(to_list, _Args) -> [not_map_or_iterator]; +format_maps_error(update, [Key, _Value, Map]) when is_map(Map) -> + false = is_map_key(Key, Map), %Assertion. + [<<"not present in map">>, [], []]; format_maps_error(update, _Args) -> [[], [], not_map]; format_maps_error(update_with, [_Key, Fun, Map]) ->