Add ResolveResponseStatus function to help middleware/handlers determine HTTP status code and echo.Response by aldas · Pull Request #2900 · labstack/echo

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