Skip to content

Commit 01b2682

Browse files
authored
Merge pull request #44 from internetee/43-improve-logging-of-erroneous-frames
Add logging for malformed frames
2 parents 1ff9e87 + e03ba67 commit 01b2682

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

apps/epp_proxy/src/epp_tcp_worker.erl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ handle_cast(process_command,
7272
#invalid_frame{message = Message, code = Code,
7373
cl_trid = ClTRID} ->
7474
Command = "error",
75+
lager:error("The following frame is erroneous: [~p]~n",
76+
[RawFrame]),
7577
Request = epp_http_client:request_builder(#{command =>
7678
Command,
7779
session_id => SessionId,
@@ -161,6 +163,8 @@ log_on_timeout(State) ->
161163
%% Get status, XML record, command and clTRID if defined.
162164
%% Otherwise return an invalid frame with predefined error message and code.
163165
parse_frame(Frame) ->
166+
lager:info("Got the following frame to parse: [~p]~n",
167+
[Frame]),
164168
ClTRID = epp_xml:find_cltrid(Frame),
165169
case epp_xml:parse(Frame) of
166170
{ok, XMLRecord} ->

0 commit comments

Comments
 (0)