Skip to content

Commit e03ba67

Browse files
committed
Add logging for malformed frames
Closes #43
1 parent 631af0e commit e03ba67

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)