Drain the water before cleaning a washer's pump filter
Opening the filter immediately can spill water. Check your model, unplug it, drain the remaining water, clean the filter and check for leaks.
Not every front-loader has a user-serviceable filter, and its location varies. Follow your manual and let any hot water cool. If water cannot be drained or the filter is stuck, request service rather than forcing it.