anchor.diff:  		Errors :: [Error],
   		Error :: {Code, #diameter_avp{}} | Code,
   		Code :: 0..4294967295,
  -		Action :: Reply | {relay, [Opt]} | discard
  -			| {eval | eval_packet, Action, PostF},
  -		Reply :: {reply, packet() | message()}
  -			| {answer_message, 3000..3999|5000..5999}
  -			| {protocol_error, 3000..3999},
  -		Opt :: diameter:call_opt(),
  -		PostF :: diameter:evaluable().
  +		Result :: ok | {error, Error}.
   %% @doc Handle errors in requests.
   %% @private
   errors(ServiceName, Capabilities, _Request,
  
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, Capabilities, Request, T)
  	end;
  request(ServiceName, Capabilities, Request, []) ->
  	{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
  