anchor.diff:  			request(ServiceName, Capabilities, Request, T)
   	end;
   request(ServiceName, Capabilities, Request, []) ->
  -	errors(ServiceName, Capabilities, Request, [?'DIAMETER_BASE_RESULT-CODE_UNKNOWN_PEER']).
  +	{error, Error} = errors(ServiceName, Capabilities, Request,
  +			[?'DIAMETER_BASE_RESULT-CODE_UNKNOWN_PEER']),
  +	{answer_message, Error}.
   
   -spec process_request(ServiceName, Capabilities, Request,
   		Address, Port, PasswordReq, Trusted) -> Result
  
positive.code: 	error_logger:error_report(["DIAMETER AVP unsupported",
  			{service_name, ServiceName}, {capabilities, Capabilities},
  			{errors, Errors}]),
  	{answer_message, ?'DIAMETER_BASE_RESULT-CODE_AVP_UNSUPPORTED'};
  errors(ServiceName, Capabilities, _Request,
  		[{?'DIAMETER_BASE_RESULT-CODE_INVALID_AVP_VALUE', _} | _] = Errors) ->
  	error_logger:error_report(["DIAMETER AVP invalid",
  			{service_name, ServiceName}, {capabilities, Capabilities},
  			{errors, Errors}]),
  	{answer_message, ?'DIAMETER_BASE_RESULT-CODE_INVALID_AVP_VALUE'};
  errors(ServiceName, Capabilities, _Request,
  		[{?'DIAMETER_BASE_RESULT-CODE_MISSING_AVP', _} | _] = Errors) ->
  	error_logger:error_report(["DIAMETER AVP missing",
  			{service_name, ServiceName}, {capabilities, Capabilities},
  			{errors, Errors}]),
  	{answer_message, ?'DIAMETER_BASE_RESULT-CODE_MISSING_AVP'};
  errors(ServiceName, Capabilities, _Request,
  		[{?'DIAMETER_BASE_RESULT-CODE_CONTRADICTING_AVPS', _} | _] = Errors) ->
  	error_logger:error_report(["DIAMETER AVPs contradicting",
  			{service_name, ServiceName}, {capabilities, Capabilities},
  			{errors, Errors}]),
  	{answer_message, ?'DIAMETER_BASE_RESULT-CODE_CONTRADICTING_AVPS'};
  errors(ServiceName, Capabilities, _Request,
  		[{?'DIAMETER_BASE_RESULT-CODE_AVP_NOT_ALLOWED', _} | _] = Errors) ->
  	error_logger:error_report(["DIAMETER AVP not allowed",
  			{service_name, ServiceName}, {capabilities, Capabilities},
  			{errors, Errors}]),
  	{answer_message, ?'DIAMETER_BASE_RESULT-CODE_AVP_NOT_ALLOWED'};
  errors(ServiceName, Capabilities, _Request,
  		[{?'DIAMETER_BASE_RESULT-CODE_AVP_OCCURS_TOO_MANY_TIMES', _} | _] = Errors) ->
  	error_logger:error_report(["DIAMETER AVP too many times",
  			{service_name, ServiceName}, {capabilities, Capabilities},
  			{errors, Errors}]),
  	{answer_message, ?'DIAMETER_BASE_RESULT-CODE_AVP_OCCURS_TOO_MANY_TIMES'};
  errors(ServiceName, Capabilities, _Request,
  		[{?'DIAMETER_BASE_RESULT-CODE_INVALID_AVP_LENGTH', _} | _] = Errors) ->
  	error_logger:error_report(["DIAMETER AVP invalid length",
  			{service_name, ServiceName}, {capabilities, Capabilities},
  			{errors, Errors}]),
  	{answer_message, ?'DIAMETER_BASE_RESULT-CODE_INVALID_AVP_LENGTH'};
  errors(_ServiceName, _Capabilities, _Request, [{ResultCode, _} | _]) ->
  	{answer_message, ResultCode};
  errors(_ServiceName, _Capabilities, _Request, [ResultCode | _]) ->
  	{answer_message, ResultCode};
  errors(ServiceName, Capabilities, Request, []) ->
  	request(ServiceName, Capabilities, Request).
  
  
negative.code: 	request(ServiceName, Caps, Request);
  handle_request(#diameter_packet{msg = Request, errors = Errors} = _Packet,
  		ServiceName, {_, Caps} = _Peer) ->
  	case errors(ServiceName, Caps, Request, Errors) of
  		ok ->
  			request(ServiceName, Caps, Request);
  		{error, Error} ->
  			{answer_message, Error}
  	end.
  
  %%----------------------------------------------------------------------
  %%  internal functions
  