correct handling of WMS errors