Class: ApiError
Defined in: apiError.ts:74
A non-2xx REST answer, thrown by apiCall and by the callApi of
@ttoss/http-server-mcp-openapi. A tool registered with registerTools
that lets it escape answers apiErrorResult: the text line plus the
envelope as structuredContent, so a client reads the error code without
parsing a string.
Extends
Error
Constructors
Constructor
new ApiError(
__namedParameters):ApiError
Defined in: apiError.ts:81
Parameters
| Parameter | Type |
|---|---|
__namedParameters | ApiErrorParams |
Returns
ApiError
Overrides
Error.constructor
Properties
[API_ERROR]
readonly[API_ERROR]:true=true
Defined in: apiError.ts:79
body
readonlybody:unknown
Defined in: apiError.ts:78
The parsed response body, undefined when it was not JSON.
status
readonlystatus:number
Defined in: apiError.ts:76
The HTTP status the REST API answered.