[Geoserver-devel] [jira] (GEOS-5567) GetMap exceptions parameter ignored - exception returned as XML

Evan Martin created BugGEOS-5567
GetMap exceptions parameter ignored - exception returned as XML

Issue Type:

BugBug

Affects Versions:

2.2.2

Assignee:

Andrea Aime

Components:

WMS

Created:

15/Jan/13 11:23 PM

Description:

When I make a WMS request that causes an exception the exception is always returned in XML format, regardless of what I specify in the “exceptions” parameter. Eg. if I specify a layer name that doesn’t exist:

http://localhost:8080/geoserver/aixm/wms?service=WMS&version=1.1.0&request=GetMap&exceptions=application/vnd.ogc.inimage&layers=badlayer&styles=&srs=EPSG:4326&format=image%2Fpng

The response I get is:

<?xml version=“1.0” encoding=“UTF-8” standalone=“no”?><!DOCTYPE ServiceExceptionReport SYSTEM “http://localhost:8080/geoserver/schemas/wms/1.1.1/WMS_exception_1_1_1.dtd”> <ServiceExceptionReport version=“1.1.1” > <ServiceException code=“LayerNotDefined”>
Could not find layer aixm:badlayer
</ServiceException></ServiceExceptionReport>

Based on the documentation I expect an image to be returned. The same happens no matter what I try as the “exceptions” value.

Environment:

Windows 7 x64, JVM 1.6.0_31

Project:

GeoServer

Priority:

MajorMajor

Reporter:

Evan Martin

This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your [JIRA administrators](https://jira.codehaus.org/secure/ContactAdministrators!default.jspa). For more information on JIRA, see: [http://www.atlassian.com/software/jira](http://www.atlassian.com/software/jira)

Evan Martin reopened BugGEOS-5567
GetMap exceptions parameter ignored - exception returned as XML

Thanks, but I get exactly the same result with “application/vnd.ogc.se_inimage” as well as anything else I tried that’s listed on http://docs.geoserver.org/stable/en/user/services/wms/reference.html (eg. “application/json”)

Also, if the value of the exceptions parameter is invalid I think GeoServer should report an error about that, rather than ignoring it. That way the user will know about the problem straight away and can fix it. Ignoring it causes several issues:

  1. The problem may go unnoticed until there actually is a real error.
  2. Even when there is, they won’t know what the error is (since they’re expecting it as an image or whatever).
  3. Even when the user reads the exception (in XML format) they have no clue why it’s not being returned in the correct format - hence this bug.

Change By:

Evan Martin (28/Jan/13 12:09 AM)

Status:

Resolved Reopened

Resolution:

Not A Bug

This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your [JIRA administrators](https://jira.codehaus.org/secure/ContactAdministrators!default.jspa). For more information on JIRA, see: [http://www.atlassian.com/software/jira](http://www.atlassian.com/software/jira)