geopython / geopython/pygeoapi

Http errors below 500 shouldn't log errors.

Open
#2,385 0 comments 0 reactions 1 assignee Claimed by @tomkralidis View on GitHub
enhancement
Dominant language
Python
Stars
624
Forks
326
Avg merge
8h 25m
Merged PRs (30d)
2

Description

**Is your feature request related to a problem? Please describe.**

We're currently getting many error logs in our service just because a user might pass in the wrong collection name. I see that `API` indiscriminately logs everything it receives in `get_exception` as an error: https://github.com/geopython/pygeoapi/blob/master/pygeoapi/api/__init__.py#L578.

**Describe the solution you'd like**

Errors below 500 should not be logged as errors. It produces noise and causes external logging services to send many false positives. Such errors can be logged as a warning or info, and a proper message should be returned to the client.

I can make a change for this if the idea is acceptable.

**Describe alternatives you've considered**

**Additional context**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.