Try removing the whole headlight assembly, remove the bulbs, from the holes where the bulbs come off, try to drain the water from it or just leave it under the sun for a couple of minutes to let it dry.

When it's finally dry, inspect the edge of the clear lens for any open gaps that can lead for water entering it. If you find any openings/gaps or just not confident with it, try putting a super glue on the whole edge to seal it.

Just be wary of getting any wires wet, so it's just better to leave it under the sun to dry naturally.

By the way, which part did you fail? Technical or Legal part?