anchor.diff:  		when StatusCode >= 200, StatusCode  < 300 ->
   	{ok, ok, State#state{estabslished = true, pending = false}};
   handle_call({RequestId,
  -		{{_HttpVersion, StatusCode, _ReasonPhrase}, _Headers, _Body}}, State) ->
  +		{{_HttpVersion, StatusCode, ReasonPhrase}, _Headers, _Body}}, State) ->
   	error_logger:warning_report(["Event shipping failed",
   			{module, ?MODULE}, {state, State},
  -			{status, StatusCode}, {request, RequestId}]),
  +			{status, StatusCode}, {reason, ReasonPhrase},
  +			{request, RequestId}]),
   	ok = gen_event:delete_handler(ocs_event_log, ocs_event_log, []),
  -	{remove_handler, {error, StatusCode}};
  +	{remove_handler, ReasonPhrase};
   handle_call({RequestId, {error, Reason}}, State) ->
   	error_logger:warning_report(["Event shipping failed",
   			{module, ?MODULE}, {state, State},
   			{error, Reason}, {request, RequestId}]),
   	ok = gen_event:delete_handler(ocs_event_log, ocs_event_log, []),
  -	{remove_handler, {error, Reason}}.
  +	{remove_handler, Reason}.
   
   -spec handle_info(Info, Fsm) -> Result
   	when
  
positive.code: handle_event1(Request, Profile,
  		#state{estabslished = false, pending = false} = State) ->
  	NewState = State#state{estabslished = false, pending = true},
  	MFA = {?MODULE, handle_async, [NewState]},
  	Options = [{sync, false}, {receiver, MFA}],
  	case httpc:request(post, Request, [], Options, Profile) of
  		{ok, RequestId} when is_reference(RequestId) ->
  
negative.code: code_change(_OldVsn, State, _Extra) ->
  	{ok, State}.
  
  -spec pending_result(ReplyInfo, EventManager, Handler) -> ok
  	when
  		ReplyInfo :: tuple(),
  		EventManager :: pid(),
  		Handler :: gen_event_log.
  %% @doc Handle async result of httpc:request/5 while session pending.
  %% @private
  pending_result(ReplyInfo, EventManager, Handler) ->
  	case gen_event:call(EventManager, Handler, ReplyInfo) of
  		ok ->
  			ok;
  		{error, _Reason} ->
  			error_logger:warning_report(["Event shipping failed",
  					{module, ?MODULE}, {manager, EventManager}, {handler, Handler}]),
  			gen_event:delete_handler(EventManager, Handler, [])
  	end.
  
  -spec established_result(ReplyInfo) -> ok
  	when
  		ReplyInfo :: tuple().
  %% @doc Handle async result of httpc:request/5 while session established.
  %% @private
  established_result({_RequestId,
  		{{_HttpVersion, StatusCode, _ReasonPhrase}, _Headers, _Body}})
  		when StatusCode >= 200, StatusCode  < 300 ->
  	ok;
  established_result({RequestId,
  		{{_HttpVersion, StatusCode, ReasonPhrase}, _Headers, _Body}}) ->
  	error_logger:warning_report(["Event shipping failed",
  			{module, ?MODULE},
  			{status, StatusCode}, {reason, ReasonPhrase},
  			{request, RequestId}]),
  	gen_event:delete_handler(ocs_event_log, ocs_event_log, []);
  established_result({RequestId, {error, Reason}}) ->
  	error_logger:warning_report(["Event shipping failed",
  			{module, ?MODULE},
  			{error, Reason}, {request, RequestId}]),
  	gen_event:delete_handler(ocs_event_log, ocs_event_log, []).
  
  