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

Tweak healthcheck response body #9

Merged
merged 1 commit into from
Aug 10, 2020

Commits on Aug 7, 2020

  1. Tweak healthcheck response body

    We want to give some simple static response here, but {"200": "OK"}
    isn't ideal. The response status is meant to be communicated in the
    HTTP status code. Embedding in the response body as well encourages
    callers to wrongly ignore the HTTP code and opens the possibility
    that the two codes might not match.
    
    Let's use the same response model as FastAPI uses by default for
    errors, which is:
    
    - no embedded response code
    - a "detail" attribute with human-oriented text
    
    This isn't a big deal since this is mainly for internal use, but
    let's get it right before adding other APIs.
    rohanpm committed Aug 7, 2020
    Configuration menu
    Copy the full SHA
    7bf13d2 View commit details
    Browse the repository at this point in the history