How to capture errors

391
0
05-01-2010 03:58 AM
PaigeBaldassaro
New Contributor
I am trying to load layers using various REST services via Javascript.

var layer1 = new esri.layers.ArcGISDynamicMapServiceLayer(RestURL);
map.addLayer(layer1);

the server isn't very reliable and sometimes returns an error code of 500, sometimes just a blank image. I need to know how to capture and detect error codes generated from the request.

Paige
0 Kudos
0 Replies