anchor.diff:      <<"details">> := #{<<"key">> := Key}}) ->
       ?ERROR_BAD_VALUE_ID_NOT_FOUND(Key);
   
  +json_to_error(_, #{
  +    <<"id">> := <<"badValueAmbiguousId">>,
  +    <<"details">> := #{<<"key">> := Key}
  +}) ->
  +    ?ERROR_BAD_VALUE_AMBIGUOUS_ID(Key);
  +
   json_to_error(_, #{<<"id">> := <<"badValueIdentifierOccupied">>,
       <<"details">> := #{<<"key">> := Key}}) ->
       ?ERROR_BAD_VALUE_IDENTIFIER_OCCUPIED(Key);
  
positive.code:     #{
          <<"id">> => <<"forbidden">>
      };
  error_to_json(_, ?ERROR_BAD_MACAROON) ->
      #{
          <<"id">> => <<"badMacaroon">>
  
negative.code: 
  json_to_error(_, #{<<"id">> := <<"forbidden">>}) ->
      ?ERROR_FORBIDDEN;
  
  json_to_error(_, #{<<"id">> := <<"alreadyExists">>}) ->
      ?ERROR_ALREADY_EXISTS;
  
  json_to_error(_, #{
      <<"id">> := <<"posix">>,
      <<"details">> := #{<<"errno">> := Errno}
  }) ->
      ?ERROR_POSIX(binary_to_existing_atom(Errno, utf8));
  
  json_to_error(_, #{<<"id">> := <<"badMacaroon">>}) ->
      ?ERROR_BAD_MACAROON;
  