[Geoserver-devel] [JIRA] (GEOS-10850) Keep root cause in ExceptionText when generating OGC exception for WFS-T insert/update/delete error

Martin Kalén created an issue

GeoServer / ImprovementGEOS-10850

Keep root cause in ExceptionText when generating OGC exception for WFS-T insert/update/delete error

Issue Type:

ImprovementImprovement

Affects Versions:

2.22.2

Assignee:

Unassigned

Components:

WFS

Created:

02/Feb/23 6:15 PM

Environment:

Windows Server

Priority:

MediumMedium

Reporter:

Martin Kalén

When using GeoServer WFS module for transactional updates, any underlying exception text is lost while producing the ExceptionText element of resulting OGC Exception. This is a nuisance e.g. if storage is JDBC based and there is trigger code to validate data and return user-oriented information in SQL exceptions if validation fails. Current GeoServer WFS implementation is not database logic layer-friendly. The whole exception chain from GeoTools JDBC module and upwards to WFS module, e.g. UpdateElementHandler is already prepared for keeping the root cause exception so the change is trivial to get the underlying error to “bubble up”.

To reproduce with MS SQL Server:

  1. Implement a view in SQL Server, add a INSTEAD OF UPDATE trigger, raise an SQL error in the trigger implementation
  2. Perform a WFS-T update via GeoServer, on a published feature with SQL Server storage connected to the underlying view
  3. Review ExceptionText element in GeoServer WFS-T OGC exception report / response

Expected: descriptive text from SQL error visible in exception report.

Actual: Static text “Update error: }}" + “{{Error occured updating features" generated by getting the message text only from the top exception in UpdateElementHandler’s implementation.

The same applies for:

  • inserts and “Error performing insert: “ prefix + only top exception message text in WFS InsertElementHandler implementation
  • deletes + only top exception message text in WFS DeleteElementHandler implementation

Also the prefix handling of the string is different for all three error types, suggest to unify the prefix structure.

Add Comment

Add Comment

Get Jira notifications on your phone! Download the Jira Cloud app for Android or iOS


This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100214-sha1:fcee39f)

Atlassian logo