Skip to content

Http errors below 500 shouldn't log errors. #2385

Description

@ka7eh

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

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions