ApiController.InternalServerError Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
- 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