handle different messages for error processing