Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why status code 500 for errors in user supplied health checks? #13

Open
trasch opened this issue Apr 13, 2016 · 0 comments
Open

Why status code 500 for errors in user supplied health checks? #13

trasch opened this issue Apr 13, 2016 · 0 comments

Comments

@trasch
Copy link
Contributor

trasch commented Apr 13, 2016

I'm playing with health checks currently, and tried this code (from the README):

var strata = tilestrata({
    healthy: function(callback) {
        callback(new Error('CPU is too high'), {loadavg: 3});
    }
});

This returns an HTTP code 500, which I would expect only if my request crashed the server. Also, the returned JSON already includes a hint that something is wrong ("ok":false).
I wonder, what was the reasoning to set the status code to 500?

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

No branches or pull requests

1 participant