anchor.diff:  				error_logger:warning_report(["diameter accounting subscriber not found",
   						{module, ?MODULE}, {subscriber, Subscriber},
   						{origin_host, OHost}]),
  -				{Reply, NewState} = generate_diameter_error(Request, SId, Subscriber,
  -						0, ?'3GPP_RESULT-CODE_USER_UNKNOWN', OHost,
  -						ORealm, ?RO_APPLICATION_ID, RequestType, RequestNum, State),
  +				{Reply, NewState} = generate_diameter_error(SId, ?'3GPP_RESULT-CODE_USER_UNKNOWN',
  +						OHost, ORealm, ?RO_APPLICATION_ID, RequestType, RequestNum, State),
   				{reply, Reply, NewState};
   			{error, _Reason} ->
  -				{Reply, NewState} = generate_diameter_error(Request, SId, Subscriber,
  -						0, ?'3GPP_RESULT-CODE_RATING_FAILED', OHost,
  -						ORealm, ?RO_APPLICATION_ID, RequestType, RequestNum, State),
  +				{Reply, NewState} = generate_diameter_error(SId, ?'3GPP_RESULT-CODE_RATING_FAILED',
  +						OHost, ORealm, ?RO_APPLICATION_ID, RequestType, RequestNum, State),
   				{reply, Reply, NewState}
   		end
   	catch
   		_:_Reason1 ->
  -			{Reply1, NewState0} = generate_diameter_error(Request, SId, Subscriber,
  -					0, ?'DIAMETER_BASE_RESULT-CODE_UNABLE_TO_COMPLY', OHost,
  +			{Reply1, NewState0} = generate_diameter_error(SId,
  +					?'DIAMETER_BASE_RESULT-CODE_UNABLE_TO_COMPLY', OHost,
   					ORealm, ?RO_APPLICATION_ID, RequestType, RequestNum, State),
   			{reply, Reply1, NewState0}
   	end.
  
positive.code: 				Subscriber, OHost, DHost, ORealm, DRealm, State)
  	catch
  		_:_Reason ->
  			{Reply1, NewState1} = generate_diameter_error(Request, SId, undefined,
  					undefined, ?'DIAMETER_BASE_RESULT-CODE_UNABLE_TO_COMPLY', OHost,
  					ORealm, ?RO_APPLICATION_ID, RequestType, RequestNum, State),
  			{reply, Reply1, NewState1}
  	end.
  
negative.code: 			accounting_event_type(RequestType), Request, Reply),
  	{Reply, State}.
  
  -spec generate_diameter_error(SessionId, ResultCode, OriginHost,
  		OriginRealm, AuthAppId, RequestType, RequestNum, State) -> Result
  	when
  		SessionId :: string(),
  		ResultCode :: integer(),
  		OriginHost :: string(),
  		OriginRealm :: string(),
  		AuthAppId :: integer(),
  		RequestType :: integer(),
  		RequestNum :: integer(),
  		State :: state(),
  		Result :: {Reply, State},
  		Reply :: #'3gpp_ro_CCA'{}.
  %% @doc Send CCA to DIAMETER client indicating an operation failure.
  %% @hidden
  generate_diameter_error(SId, ResultCode, OHost,
  		ORealm, AuthAppId, RequestType, RequestNum, State) ->
  	Reply = #'3gpp_ro_CCA'{'Session-Id' = SId, 'Result-Code' = ResultCode,
  			'Origin-Host' = OHost, 'Origin-Realm' = ORealm,
  