Added exception for messages with missing/invalid headers