mirror of
https://github.com/internetee/epp_proxy.git
synced 2025-08-17 04:53:48 +02:00
Merge pull request #44 from internetee/43-improve-logging-of-erroneous-frames
Add logging for malformed frames
This commit is contained in:
commit
01b2682d51
1 changed files with 4 additions and 0 deletions
|
@ -72,6 +72,8 @@ handle_cast(process_command,
|
||||||
#invalid_frame{message = Message, code = Code,
|
#invalid_frame{message = Message, code = Code,
|
||||||
cl_trid = ClTRID} ->
|
cl_trid = ClTRID} ->
|
||||||
Command = "error",
|
Command = "error",
|
||||||
|
lager:error("The following frame is erroneous: [~p]~n",
|
||||||
|
[RawFrame]),
|
||||||
Request = epp_http_client:request_builder(#{command =>
|
Request = epp_http_client:request_builder(#{command =>
|
||||||
Command,
|
Command,
|
||||||
session_id => SessionId,
|
session_id => SessionId,
|
||||||
|
@ -161,6 +163,8 @@ log_on_timeout(State) ->
|
||||||
%% Get status, XML record, command and clTRID if defined.
|
%% Get status, XML record, command and clTRID if defined.
|
||||||
%% Otherwise return an invalid frame with predefined error message and code.
|
%% Otherwise return an invalid frame with predefined error message and code.
|
||||||
parse_frame(Frame) ->
|
parse_frame(Frame) ->
|
||||||
|
lager:info("Got the following frame to parse: [~p]~n",
|
||||||
|
[Frame]),
|
||||||
ClTRID = epp_xml:find_cltrid(Frame),
|
ClTRID = epp_xml:find_cltrid(Frame),
|
||||||
case epp_xml:parse(Frame) of
|
case epp_xml:parse(Frame) of
|
||||||
{ok, XMLRecord} ->
|
{ok, XMLRecord} ->
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue