Skip to content

Add ResolveResponseStatus function to help middleware/handlers determine HTTP status code and echo.Response#2900

Merged
aldas merged 2 commits intolabstack:masterfrom
aldas:v5_resolveresponsestatus
Feb 14, 2026
Merged

Add ResolveResponseStatus function to help middleware/handlers determine HTTP status code and echo.Response#2900
aldas merged 2 commits intolabstack:masterfrom
aldas:v5_resolveresponsestatus

Conversation

@aldas
Copy link
Contributor

@aldas aldas commented Feb 12, 2026

Add ResolveResponseStatus function to help middleware/handlers determine HTTP status code and echo.Response.

Loggers and tracing middlewares need to determine status code from either from error or echo.Response. Also - response is needed often for knowing response size from echo.Response.Size. so this function tries to shorten these 2 requirements.

Relates to labstack/echo-contrib#141
and https://github.com/labstack/echo-contrib/blob/master/internal/helpers/statuscode.go

also #2892

@codecov
Copy link

codecov bot commented Feb 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.01%. Comparing base (4dd9f46) to head (19364e2).
⚠️ Report is 12 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2900      +/-   ##
==========================================
+ Coverage   92.94%   93.01%   +0.07%     
==========================================
  Files          43       43              
  Lines        4491     4496       +5     
==========================================
+ Hits         4174     4182       +8     
+ Misses        197      196       -1     
+ Partials      120      118       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@aldas aldas merged commit a260cf5 into labstack:master Feb 14, 2026
10 checks passed
@aldas aldas deleted the v5_resolveresponsestatus branch February 14, 2026 15:39
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.

1 participant