Skip to content
This repository has been archived by the owner on Sep 19, 2024. It is now read-only.

Improve error message for unsupported "count" fields #142

Open
johnjohndoe opened this issue Jul 30, 2015 · 0 comments
Open

Improve error message for unsupported "count" fields #142

johnjohndoe opened this issue Jul 30, 2015 · 0 comments

Comments

@johnjohndoe
Copy link

The sos-importer allows to import Measured values of type Count as shown in the screenshot.

sos-importer count

I open the "Sensor Web JS Client" to inspect the data for a station. When I select a station in the map view the following error message pops up:

An error occured: Resource with id '168' could not be found.

Sensor Web JS Client: Resource not found

The SOS logs in /var/log/tomcat7/52n-sos-webapp.log for this event look like this:

DEBUG [http-bio-8080-exec-7] [TimeseriesRepository.java:164] Series entry '168' without UOM will be ignored!
DEBUG [http-bio-8080-exec-7] [BaseController.java:114] An exception occured.
org.n52.web.ResourceNotFoundException: Resource with id '168' could not be found.

    at org.n52.series.api.v1.db.da.TimeseriesRepository.getInstance(TimeseriesRepository.java:165) ~[timeseries-series-dao-1.5.0.jar:na]
    at org.n52.series.api.v1.db.srv.TimeseriesAccessService.getParameter(TimeseriesAccessService.java:126) ~[timeseries-series-dao-1.5.0.jar:na]
    at org.n52.series.api.v1.db.srv.TimeseriesAccessService.getParameter(TimeseriesAccessService.java:45) ~[timeseries-series-dao-1.5.0.jar:na]
    at org.n52.web.WebExceptionAdapter.getParameter(WebExceptionAdapter.java:95) ~[timeseries-web-1.5.0.jar:na]
    at org.n52.sensorweb.v1.spi.LocaleAwareSortService.getParameter(LocaleAwareSortService.java:84) ~[timeseries-spi-1.5.0.jar:na]
    at org.n52.web.v1.ctrl.ParameterController.getItem(ParameterController.java:85) ~[timeseries-web-1.5.0.jar:na]
    at sun.reflect.GeneratedMethodAccessor316.invoke(Unknown Source) ~[na:na]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_79]
    at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_79]
    at org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:219) ~[spring-web-3.2.6.RELEASE.jar:3.2.6.RELEASE]
...

Change requests

  1. Consider providing a end user friendly error message which allows to understand why this error occurs.
  2. Please document that at the current state of the Sensor Web JS Client "count" fields are not supported by the REST-API with direct database connection --- quoting @CarstenHollmann.

Related

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant