Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

1.How do I get the http response text & error code from OpenLayers 2.12 WMS loaderror event ?

2.The WMS request returns returns http error code 500 with some response text, however, as per image below, I can't get those details.

3.Workaround: I send a HEAD request in the 'loaderror' handler

                    intramapsConfig = {
                        name : "MapImage WMS",
                        options : { "ratio": 1, "singleTile": true,
                                    "removeBackBufferDelay": 500 ,
                                    "transitionEffect" : "resize",
                                    "tileOptions": {
                                    "eventListeners": {
                                            'loaderror': function(evt) {
                                                    type: "HEAD",
                                                    async: false,
                                                    url: evt.object.url,
                                                    success: function(message,text,response){
                                                    error: function(error) {


4.The image below is the event object sent by onImageError function.

enter image description here

share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.