Skip to content

Empty Exception Body #143

Closed
Closed
@OKTAYKIR

Description

@OKTAYKIR

I am going to test bad request (400) with a customized error message. The test gets 400 as status code; however the content body is empty.

[HttpPost]
public override async Task<IActionResult> PostAsync([FromBody] Contract.User entity)
{
if (entity == null)
{
    return Error(new Error() { Status  = "400", Title = "Invalid request body", Detail = "The provided request 
    entity body is not valid." });
}

    return await base.PostAsync(entity);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions