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

856: Add health check endpoint #861

Merged
merged 1 commit into from
Mar 15, 2023
Merged

Conversation

sarahsporck
Copy link
Contributor

@sarahsporck sarahsporck commented Mar 15, 2023

Test with: curl http://localhost:8000/health --verbose

@sarahsporck sarahsporck linked an issue Mar 15, 2023 that may be closed by this pull request
}
}
ctx.status(200)
} catch (exception: ExposedSQLException) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It could also make sense to change this to exception: Exception, to increase the resilience of this endpoint.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As you want. Probably any other exception will also return some status != 200.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you're right. Otherwise it will return 500 Internal Server Error

}
}
ctx.status(200)
} catch (exception: ExposedSQLException) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As you want. Probably any other exception will also return some status != 200.

@sarahsporck sarahsporck force-pushed the 856-add-health-check-endpoint branch 2 times, most recently from 71c0686 to c59edce Compare March 15, 2023 12:44
@sarahsporck sarahsporck force-pushed the 856-add-health-check-endpoint branch from c59edce to 2fd763d Compare March 15, 2023 13:03
@sarahsporck sarahsporck merged commit 03fec1b into main Mar 15, 2023
@sarahsporck sarahsporck deleted the 856-add-health-check-endpoint branch March 15, 2023 13:53
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

Successfully merging this pull request may close these issues.

Add health check endpoint
2 participants