Skip to content
This repository has been archived by the owner on Dec 5, 2022. It is now read-only.

Log warning if handler function returns no status code #74

Open
PetrGlad opened this issue Jul 26, 2016 · 1 comment
Open

Log warning if handler function returns no status code #74

PetrGlad opened this issue Jul 26, 2016 · 1 comment
Milestone

Comments

@PetrGlad
Copy link
Contributor

Improvement, additional validation. If handler returns empty response (e.g. nil) no response status is available for statistic's metrics. This causes confusing statistic's metrics like 'some.id..POST' while ''some.id.200.POST'' is expected. I suggest log a warning in this case to help with diagnostics.

Probably this can be implemented as separate middleware but I think simplest ways is just to check this directly in add-metrics-filter inside (swap! status (fn [_] (.getStatus (cast HttpServletResponse response))))

@LappleApple
Copy link

Hi @dryewo, any plans to do something here? Maybe @PetrGlad could take it, or we could add a "Help Wanted" label.

@Otann Otann added this to the 2.0 Release milestone Jun 28, 2017
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

3 participants