show proper messages for errors