-
Notifications
You must be signed in to change notification settings - Fork 3
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
Conversation
} | ||
} | ||
ctx.status(200) | ||
} catch (exception: ExposedSQLException) { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
backend/src/main/kotlin/app/ehrenamtskarte/backend/common/webservice/HealthHandler.kt
Show resolved
Hide resolved
} | ||
} | ||
ctx.status(200) | ||
} catch (exception: ExposedSQLException) { |
There was a problem hiding this comment.
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.
71c0686
to
c59edce
Compare
c59edce
to
2fd763d
Compare
Test with:
curl http://localhost:8000/health --verbose