Replace the if's used for message type checking with proper error-handler-controlled assertions. One test needs updating to use the error handler's output.