Context.Json should not unwrap response by aldas · Pull Request #2964 · labstack/echo · GitHub
Skip to content

Context.Json should not unwrap response #2964

Merged
aldas merged 1 commit into
labstack:masterfrom
aldas:context_json_donot_unwrap
May 1, 2026
Merged

Context.Json should not unwrap response #2964
aldas merged 1 commit into
labstack:masterfrom
aldas:context_json_donot_unwrap

Conversation

@aldas

@aldas aldas commented May 1, 2026

Copy link
Copy Markdown
Contributor

Context.Json should not unwrap response and just wrap Response so other middlewares can use their own "wrapping" Responses and see the status code.

I found this during #2895 when to tried to create middleware that wraps existing response to own and status code setting did not work anymore with Context.JSON (always sends 200 to client).

…er middlewares can use their own "wrapping" Responses and see the status code.
@codecov

codecov Bot commented May 1, 2026

Copy link
Copy Markdown

@aldas aldas merged commit f16f84d into labstack:master May 1, 2026
10 checks passed
@aldas aldas deleted the context_json_donot_unwrap branch May 1, 2026 18:32
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