Hi ESRI Community.
I wonder before add or load or create a WMSLayer is possible to check it. I mean check if url is correct or if WMSLayer will be rigth
I would like not to show in the console when a WMS does not load because the url is malformed. When there is an error when adding to the map or creating the WMS in order to capture the error and display it
![igarcia_genasys_0-1649268133324.png igarcia_genasys_0-1649268133324.png](https://community.esri.com/t5/image/serverpage/image-id/38273iFC05C13E1CEF28CD/image-size/medium?v=v2&px=400)
I just do
var WMSlayer = new WMSLayer({
id: id,
title: name,
url: url,
spatialReference: {
wkid: 3857
}
});
map.add(WMSlayer );
I used .load().then(blabla and other method and events from ArgisAPI but in any of them there are way to know if url o wms is right
thanks!!!!