<!DOCTYPE html><html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /></head><body><div data-html-editor-font-wrapper="true" style="font-family: arial, sans-serif; font-size: 13px;">Does it make a difference if You define:<br><br>CONFIG 'ON_MISSING_DATA' 'IGNORE'<br><br>on the map level?<br><br>/Lars S.<br><br>4 juni 2019 kl. 21:44, "Peter Schmitt" <<a target="_blank" tabindex="-1" href="mailto:pschmitt@gmail.com?to=%22Peter%20Schmitt%22%20<pschmitt@gmail.com>">pschmitt@gmail.com</a>> skrev:<br> <blockquote><div><div><div dir="ltr">Hi,<br><br>I have MapServer configured to serve a WFS endpoint with GeoJSON. The data itself is in a PostGIS database. When I make a query for data that's non-existent, I get an empty feature collection:<br><br>> curl <a rel="external nofollow noopener noreferrer" target="_blank" tabindex="-1" href="http://localhost/mapserv?service=WFS&VERSION=1.1.0&REQUEST=getfeature&typename=some_layer&srsname=EPSG:4326&OUTPUTFORMAT=geojson&some_runtime_substitution_parameter=42">http://localhost/mapserv?service=WFS&VERSION=1.1.0&REQUEST=getfeature&typename=some_layer&srsname=EPSG:4326&OUTPUTFORMAT=geojson&some_runtime_substitution_parameter=42</a><br>> {<br>> "type": "FeatureCollection",<br>> "name": "some_layer",<br>> "features": []<br>> }<br><br>This works as anticipated. What I didn't expect is that MapServer logs an error:<br> <div>> msQueryByRect(): Search returned no results. No matching record(s) found<br><br>I think this code is being invoked: <a rel="external nofollow noopener noreferrer" target="_blank" tabindex="-1" href="https://github.com/mapserver/mapserver/blob/master/mapquery.c#L1287-L1288">https://github.com/mapserver/mapserver/blob/master/mapquery.c#L1287-L1288</a><br><br>I do not think having no results should be considered an error. Is there a way to silence just this one type of error? I couldn't find anything obvious other than other than redirecting stderr to /dev/null or remove it via grep/sed.</div> <div></div> <div>Thanks,<br>Pete</div> </div></div></div></blockquote> <br><br><signature></signature> </div></body></html>