anchor.diff:  
   json_to_error(_, #{<<"id">> := <<"protectedGroup">>}) ->
       ?ERROR_PROTECTED_GROUP;
  +
  +json_to_error(_, #{
  +    <<"id">> := <<"spaceNotSupportedBy">>,
  +    <<"details">> := #{<<"providerId">> := ProviderId}
  +}) ->
  +    ?ERROR_SPACE_NOT_SUPPORTED_BY(ProviderId);
  +
  +json_to_error(_, #{
  +    <<"id">> := <<"indexNotExistsOn">>,
  +    <<"details">> := #{<<"providerId">> := ProviderId}
  +}) ->
  +    ?ERROR_INDEX_NOT_EXISTS_ON(ProviderId);
  +
  +json_to_error(_, #{<<"id">> := <<"transferAlreadyEnded">>}) ->
  +    ?ERROR_TRANSFER_ALREADY_ENDED;
  +
  +json_to_error(_, #{<<"id">> := <<"transferNotEnded">>}) ->
  +    ?ERROR_TRANSFER_NOT_ENDED;
   
   json_to_error(_, #{<<"id">> := <<"relationDoesNotExist">>,
       <<"details">> := #{
  
positive.code: 
  json_to_error(_, #{<<"id">> := <<"forbidden">>}) ->
      ?ERROR_FORBIDDEN;
  
  json_to_error(_, #{<<"id">> := <<"badMacaroon">>}) ->
      ?ERROR_BAD_MACAROON;
  
negative.code:             <<"key">> => Key
          }
      };
  error_to_json(_, ?ERROR_BAD_VALUE_AMBIGUOUS_ID(Key)) ->
      #{
          <<"id">> => <<"badValueAmbiguousId">>,
          <<"details">> => #{
              <<"key">> => Key
          }
      };
  error_to_json(_, ?ERROR_BAD_VALUE_IDENTIFIER_OCCUPIED(Key)) ->
      #{
          <<"id">> => <<"badValueIdentifierOccupied">>,
  