Fix 500 Error Response in /ping Endpoint #12
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This pull request addresses an issue with the
/ping
endpoint in the FastAPI application which causes predictable 500 Internal Server Error responses when the UNIX timestamp is divisible by 3. The code modification proposed will ensure the endpoint reliably returns a successful response without raising errors.Changes Made
/ping
endpoint to remove the condition that raises an exception.Rationale
By removing the behavior that generates internal server errors, we improve the reliability of the service and ensure a consistent response from the
/ping
endpoint, thus reducing false alerts related to high error rates. This change will stabilize operations and should resolve the current alert situation.