Results.BadRequest(Object) Method

Definition

Produces a Status400BadRequest response.

public static Microsoft.AspNetCore.Http.IResult BadRequest (object? error = default);
static member BadRequest : obj -> Microsoft.AspNetCore.Http.IResult
Public Shared Function BadRequest (Optional error As Object = Nothing) As IResult

Parameters

error
Object

An error object to be included in the HTTP response body.

Returns

IResult

The created IResult for the response.

Applies to