fixed up error handling and routes from WMS