If your WMS server allows you to specify a (safer) mechanism by which it can return errors, then I'd recommend using that feature. Otherwise, you'll have to try and limit yourself to areas of the world that don't produce an error.