Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question]ctx in ResponseEncoder and ErrorEncoder lost metadata information #3459

Closed
MichealJl opened this issue Nov 5, 2024 · 1 comment
Labels
question Further information is requested

Comments

@MichealJl
Copy link

为什么我在http.Middleware 中的中间件设置了metadata,在ResponseEncoder中获取不到

image 在http的middleware中的以及后续业务中都能拿到我在ctx中设置的metadata, 但是responseEncoder中就不行
@MichealJl MichealJl added the question Further information is requested label Nov 5, 2024
@kratos-ci-bot kratos-ci-bot changed the title [Question]ResponseEncoder 和ErrorEncoder 中的ctx丢失了metadata信息 [Question]ctx in ResponseEncoder and ErrorEncoder lost metadata information Nov 5, 2024
Copy link

dosubot bot commented Feb 4, 2025

Hi, @MichealJl. I'm Dosu, and I'm helping the Kratos team manage their backlog. I'm marking this issue as stale.

Issue Summary

  • You reported an issue where metadata set in the HTTP middleware context is not accessible in the ResponseEncoder.
  • The metadata remains available in the subsequent business logic but is lost at the ResponseEncoder stage.
  • No comments or developments have been made on this issue yet.

Next Steps

  • Could you please confirm if this issue is still relevant to the latest version of the Kratos repository? If so, feel free to keep the discussion open by commenting here.
  • If there is no further activity, this issue will be automatically closed in 7 days.

Thank you for your understanding and contribution!

@dosubot dosubot bot added the stale Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed label Feb 4, 2025
@dosubot dosubot bot closed this as not planned Won't fix, can't repro, duplicate, stale Feb 11, 2025
@dosubot dosubot bot removed the stale Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed label Feb 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant