HTTPErrorResponse

HTTPErrorResponse[code]

is an object that represents an error response to an HTTP request, with specified error code.

Details

  • Typical error codes include:
  • "PageNotFound","NotFound",or 404
    "PermissionDenied","Forbidden", or 403
    "ServerError" or 500
  • HTTPErrorResponse is typically specified as a result from constructs such as APIFunction.

Examples

Basic Examples  (1)

Manually generate the HTTPResponse:

In[1]:=
Click for copyable input
Out[1]=

Return a page not found from a Delayed:

In[2]:=
Click for copyable input
Out[2]=

Return a 404 from an APIFunction:

In[3]:=
Click for copyable input
Out[3]=

See Also

HTTPResponse  HTTPRedirect  HTTPRequestData  GenerateHTTPResponse  APIFunction

Introduced in 2015
(10.3)