Skip to content
This repository has been archived by the owner on Nov 17, 2020. It is now read-only.

Improve logging when parsing invalid frames #119

Closed
dcorbacho opened this issue Jan 26, 2017 · 0 comments
Closed

Improve logging when parsing invalid frames #119

dcorbacho opened this issue Jan 26, 2017 · 0 comments
Assignees
Milestone

Comments

@dcorbacho
Copy link
Contributor

dcorbacho commented Jan 26, 2017

When the MQTT reader receives an invalid frame, i.e. an HTTP request, it crashes with function_clause and badmatch but sometimes it might not give enough info on the contents of the frame. Parsing errors should be captured and logged with the contents of the frame.

 exception exit: {function_clause,
                        [{rabbit_mqtt_frame,parse_utf,
                             [<<>>],
                             [{file,"src/rabbit_mqtt_frame.erl"},{line,145}]},
    exception exit: {{badmatch,
                         <<"T / HTTP/1.0\r\nAccept-Encoding: gzip\r\nAccept-Language: en\r\nAccept-Char">>},
                     [{rabbit_mqtt_frame,parse_frame,3,
                          [{file,"src/rabbit_mqtt_frame.erl"},{line,104}]},
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants