setError()
Overview
public any function setError(
string type = "rest.server.error"
, string title = "Server error"
, numeric errorCode = 500
, string message = "An unhandled exception occurred within the REST API"
, string detail = ""
, struct additionalInfo
)
Sets data, statuses and headers based on common arguments for errors
Arguments
Name | Type | Required | Description |
---|---|---|---|
type | string | No (default="rest.server.error") | |
title | string | No (default="Server error") | |
errorCode | numeric | No (default=500) | |
message | string | No (default="An unhandled exception occurred within the REST API") | |
detail | string | No (default="") | |
additionalInfo | struct | No |