Why 400 can't display status code
Why 400 can't display status code
{
"isError": true,
"error": {
"message": "Request invalid.",
"code": "BadRequest"
}
}
I want to always show status code like 200
{
"statusCode": 200,
"message": "POST Request successful.",
"result": {
"totalCount": 0,
"items": []
}
}
Have you set ShowStatusCode option?
@proudmonkey yes I have set that no status code is returned when the status code 400 is returned in the 200 status 。
app.UseAutoWrapper(new AutoWrapperOptions
{
ShowStatusCode = true,
IsDebug = !app.Environment.IsProduction(),
ShowIsErrorFlagForSuccessfulResponse = true,
DisableProblemDetailsException = true
});
Which version you are using for me to reproduce?
@proudmonkey

@proudmonkey Is it possible to reproduce and fix the problem
@apchenjun My apologies for the late response. Just got so busy with so many things. :)
I will try to reproduce the issue using the latest version and provide a fix. I'll keep this thread posted. Thank you so much for your feedback. :)
@proudmonkey I am using .Net Core 6.0