Skip to content

Conversation

@srgoogle23
Copy link

This pull request adds improved handling for HTTP exceptions in the MetricMiddleware, ensuring that metrics accurately reflect valid HTTP responses rather than internal errors.

Metrics and error handling improvements:

  • Added a catch block for HttpException in the process method of MetricMiddleware, so that HTTP exceptions are treated as valid responses and their status codes are recorded in metrics.
  • Imported HttpException to support the new error handling logic in MetricMiddleware.php.

Added a catch block for HttpException in MetricMiddleware to treat them as valid HTTP responses, updating request_status label accordingly before ending the timer. This prevents HttpExceptions from being counted as internal errors.
Deleted GitHub Actions workflows for closing pull requests and handling releases. These workflows are no longer needed or have been moved.
@luizmanhani luizmanhani merged commit af5a029 into opencodeco:main Aug 28, 2025
@srgoogle23 srgoogle23 deleted the fix/adjust-false-positives-from-server-errors branch August 28, 2025 20:01
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.

5 participants