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

allow error handler middleware to return different body type #2515

Merged
merged 4 commits into from
Dec 14, 2021

Conversation

robjtede
Copy link
Member

@robjtede robjtede commented Dec 14, 2021

PR Type

Fix

PR Checklist

  • Tests for the changes have been added / updated.
  • Docs are updated.
  • A changelog entry has been made for the appropriate packages.
  • Format code with the latest stable rustfmt.
  • (Team) Label with affected crates and semver status.

Overview

fixes #2513

@robjtede robjtede added A-web project: actix-web B-semver-major breaking change requiring a major version bump labels Dec 14, 2021
@robjtede robjtede changed the title Err-handler-bod allow error handler middleware to return different body type Dec 14, 2021
@robjtede robjtede requested review from aliemjay and removed request for aliemjay December 14, 2021 18:54
@robjtede robjtede added this to the actix-web v4 milestone Dec 14, 2021
@robjtede robjtede marked this pull request as ready for review December 14, 2021 20:11
Copy link
Member

@aliemjay aliemjay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks!

@@ -116,14 +119,15 @@ where

/// Convert `ServiceResponse`'s `ResponseBody<B>` generic type to `ResponseBody<Body>`.
pub trait MapServiceResponseBody {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this trait is useful without impl specialization!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-web project: actix-web B-semver-major breaking change requiring a major version bump
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ErrorHandlers middleware can't mutate body type
2 participants