Skip to content

Don't explicitly set ValidationProblemDetails status code #8688

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

Closed

Conversation

khellang
Copy link
Member

@khellang khellang commented Mar 20, 2019

Re: #6145 (comment)

Wrapping it in a BadRequestObjectResult below will make sure it has the correct status code set:

https://github.com/aspnet/AspNetCore/blob/aa89639d629899985b27b4ad749f707efc8892cd/src/Mvc/Mvc.Core/src/ObjectResult.cs#L61-L64

@Eilon Eilon added the area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates label Mar 20, 2019
@khellang khellang force-pushed the simplify-api-behavior-options-setup branch from 6d2d27f to 2b6d357 Compare April 25, 2019 17:47
@khellang khellang force-pushed the simplify-api-behavior-options-setup branch from 2b6d357 to 7dbd677 Compare May 28, 2019 06:42
@rynowak
Copy link
Member

rynowak commented Jul 18, 2019

@pranavkm

@khellang
Copy link
Member Author

This can probably just be closed and rolled into #12298 😊

@pranavkm
Copy link
Contributor

@khellang does the factory introduced as part of #12298 solve this problem?

@khellang
Copy link
Member Author

This isn't really a problem, it's just some redundant code I saw and thought should be removed 😊

@pranavkm
Copy link
Contributor

pranavkm commented Aug 8, 2019

@khellang while the other PR did not remove this, we do have a way to override the default status. I'm going to err on the side of caution and leave this behavior be :)

Thanks for your PR though.

@pranavkm pranavkm closed this Aug 8, 2019
@khellang
Copy link
Member Author

khellang commented Aug 9, 2019

Yeah, I just sent it cause it was explicitly asked for (and this is not about overriding the default status or changing any behavior) 😂 #6145 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants