Immunodeficiency occurs when the immune system cannot appropriately respond to infections.
Hypersensitivities are maladaptive immune reactions against harmless antigens (allergies) or against self antigens (autoimmunity).