diff --git a/CHANGELOG.md b/CHANGELOG.md index a2118474b..3ce26ebdd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ - [#64](https://github.com/LayerManager/layman/issues/64) Responses of [GET Layers](doc/rest.md#get-layers), [GET Workspace Layers](doc/rest.md#get-workspace-layers), [GET Workspace Layer](doc/rest.md#get-workspace-layer), [PATCH Workspace Layer](doc/rest.md#patch-workspace-layer), [GET Maps](doc/rest.md#get-maps), [GET Workspace Maps](doc/rest.md#get-workspace-maps), [GET Workspace Map](doc/rest.md#get-workspace-map), [PATCH Workspace Map](doc/rest.md#patch-workspace-map) contains new attribute - `native_crs` with code of native CRS in form "EPSG:<code>", e.g. "EPSG:4326" - `native_bounding_box` with coordinates and CRS of native CRS [minx, miny, maxx, maxy, "EPSG:<code>"] +- [#489](https://github.com/LayerManager/layman/issues/489) Error responses from Micka and GeoServer are logged into log and also propagated as part of raised exception, so they can be seen from flower. ## v1.15.0 2021-11-18 diff --git a/src/geoserver/util.py b/src/geoserver/util.py index 045ca3cc1..2170e4305 100644 --- a/src/geoserver/util.py +++ b/src/geoserver/util.py @@ -18,6 +18,8 @@ logger = logging.getLogger(__name__) FLASK_RULES_KEY = f"{__name__}:RULES" +WMS_VERSION = '1.3.0' +WFS_VERSION = '2.0.0' RESERVED_WORKSPACE_NAMES = [ 'default', @@ -1025,8 +1027,7 @@ def bbox_to_native_bbox(bbox): def wms_direct(wms_url, xml=None, version=None, headers=None): - from layman.layer.geoserver.wms import VERSION - version = version or VERSION + version = version or WMS_VERSION try: wms = WebMapService(wms_url, xml=xml.encode('utf-8') if xml is not None else xml, version=version, headers=headers) except requests.exceptions.HTTPError as exc: @@ -1037,8 +1038,7 @@ def wms_direct(wms_url, xml=None, version=None, headers=None): def wfs_direct(wfs_url, xml=None, version=None, headers=None): - from layman.layer.geoserver.wfs import VERSION - version = version or VERSION + version = version or WFS_VERSION try: wfs = WebFeatureService(wfs_url, xml=xml.encode('utf-8') if xml is not None else xml, version=version, headers=headers) except requests.exceptions.HTTPError as exc: diff --git a/src/layman/layer/geoserver/wfs.py b/src/layman/layer/geoserver/wfs.py index c9d3fdf0c..d3e9f110a 100644 --- a/src/layman/layer/geoserver/wfs.py +++ b/src/layman/layer/geoserver/wfs.py @@ -15,7 +15,7 @@ FLASK_PROXY_KEY = f'{__name__}:PROXY:{{workspace}}' PATCH_MODE = patch_mode.DELETE_IF_DEPENDANT -VERSION = '2.0.0' +VERSION = gs_util.WFS_VERSION get_publication_uuid = empty_method_returns_none pre_publication_action_check = empty_method diff --git a/src/layman/layer/geoserver/wms.py b/src/layman/layer/geoserver/wms.py index d1c383913..71db774f8 100644 --- a/src/layman/layer/geoserver/wms.py +++ b/src/layman/layer/geoserver/wms.py @@ -16,7 +16,7 @@ DEFAULT_GEOTIFF_STORE_PREFIX = 'geotiff' PATCH_MODE = patch_mode.DELETE_IF_DEPENDANT -VERSION = '1.3.0' +VERSION = gs_util.WMS_VERSION pre_publication_action_check = empty_method post_layer = empty_method