{"action":"opened","issue":{"url":"https://api.github.com/repos/elixir-lang/elixir/issues/3126","labels_url":"https://api.github.com/repos/elixir-lang/elixir/issues/3126/labels{/name}","comments_url":"https://api.github.com/repos/elixir-lang/elixir/issues/3126/comments","events_url":"https://api.github.com/repos/elixir-lang/elixir/issues/3126/events","html_url":"https://github.com/elixir-lang/elixir/issues/3126","id":59236116,"number":3126,"title":"Map update syntax raises semi-cryptic error","user":{"login":"whatyouhide","id":3890250,"avatar_url":"https://avatars.githubusercontent.com/u/3890250?v=3","gravatar_id":"","url":"https://api.github.com/users/whatyouhide","html_url":"https://github.com/whatyouhide","followers_url":"https://api.github.com/users/whatyouhide/followers","following_url":"https://api.github.com/users/whatyouhide/following{/other_user}","gists_url":"https://api.github.com/users/whatyouhide/gists{/gist_id}","starred_url":"https://api.github.com/users/whatyouhide/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whatyouhide/subscriptions","organizations_url":"https://api.github.com/users/whatyouhide/orgs","repos_url":"https://api.github.com/users/whatyouhide/repos","events_url":"https://api.github.com/users/whatyouhide/events{/privacy}","received_events_url":"https://api.github.com/users/whatyouhide/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-02-27T13:29:36Z","updated_at":"2015-02-27T13:29:36Z","closed_at":null,"body":"I wouldn't be opening this if @josevalim didn't say something like \"if you get an error and you don't know what to do next, that's a bug\" :smile:.\r\n\r\nThe map update syntax (`|`) raises an `ArgumentError` with message `argument error` when it's used to try and update a key that isn't in the map.\r\n\r\n```elixir\r\niex> map = %{a: 1}\r\n%{a: 1}\r\niex> %{map | b: 2}\r\n** (ArgumentError) argument error\r\n    (stdlib) :maps.update(:b, 2, %{a: 1})\r\n    (stdlib) erl_eval.erl:255: anonymous fn/2 in :erl_eval.expr/5\r\n    (stdlib) lists.erl:1261: :lists.foldl/3\r\n```\r\n\r\nI briefly tried to solve this myself by digging through `elixir/src/` but I am *deeply* unfamiliar with the Erlang side of Elixir. Is there a way this `ArgumentError` can be given a more meaningful error message?"}}