how to change Geoserver 2.8.2 WMS exception format

Viewed 67
1 Answers

The format can be changed only while performing a GetMap request (it cannot be configured, I believe the standard mandates the usage of XML exceptions by default).

When issuing a GetMap request, add the key value pair &EXCEPTIONS=application/vnd.ogc.se_inimage or &EXCEPTIONS=application/vnd.ogc.se_blank in the URL.

E.g.:

https://gs-main.geosolutionsgroup.com/geoserver/tiger/wms?service=WMS&version=1.1.0&request=GetMap&layers=tiger%3Agiant_polygon&bbox=-180.0%2C-90.0%2C180.0%2C90.0&width=768&height=384&srs=EPSG%3A4326&styles=foobar&format=image/png&EXCEPTIONS=application/vnd.ogc.se_inimage

(should return an image saying that the foobar style does not exist)

Related