Share via


ApiController.InternalServerError Method

Definition

Overloads

InternalServerError()

Creates an InternalServerErrorResult (500 Internal Server Error).

InternalServerError(Exception)

Creates an ExceptionResult (500 Internal Server Error) with the specified exception.

InternalServerError()

Source:
ApiController.cs
Source:
ApiController.cs

Creates an InternalServerErrorResult (500 Internal Server Error).

[Microsoft.AspNetCore.Mvc.NonAction]
public virtual System.Web.Http.InternalServerErrorResult InternalServerError ();
[<Microsoft.AspNetCore.Mvc.NonAction>]
abstract member InternalServerError : unit -> System.Web.Http.InternalServerErrorResult
override this.InternalServerError : unit -> System.Web.Http.InternalServerErrorResult
Public Overridable Function InternalServerError () As InternalServerErrorResult

Returns

A InternalServerErrorResult.

Attributes

Applies to

InternalServerError(Exception)

Source:
ApiController.cs
Source:
ApiController.cs

Creates an ExceptionResult (500 Internal Server Error) with the specified exception.

[Microsoft.AspNetCore.Mvc.NonAction]
public virtual System.Web.Http.ExceptionResult InternalServerError (Exception exception);
[<Microsoft.AspNetCore.Mvc.NonAction>]
abstract member InternalServerError : Exception -> System.Web.Http.ExceptionResult
override this.InternalServerError : Exception -> System.Web.Http.ExceptionResult
Public Overridable Function InternalServerError (exception As Exception) As ExceptionResult

Parameters

exception
Exception

The exception to include in the error.

Returns

An ExceptionResult with the specified exception.

Attributes

Applies to