fix incorrect error code for certain message framing errors