Constructor
new TDXApiError()
- Source:
Examples
const failure = {
code: "NotFound",
message: "resource not found: KDiEI3k_"
};
const failure = {
code: "BadRequestError",
message: [
{
key: {id: "foo"},
error: {
message: "document not found matching key 'foo'"
}
},
{
key: {id: "bar"},
error: {
message: "'hello' is not a valid enum value",
name: "ValidatorError",
kind: "enum"
path: "value"
}
}
]
};
Members
code :number
- Source:
The HTTP response status code, e.g. 401.
Type:
- number
failure :FailureObject
- Source:
An object containing the error information as received from the TDX
Type:
from :string
- Source:
Usually the name of the API call that originated the error, e.g. updateData
Type:
- string
message :string
- Source:
- Deprecated:
- This is included for legacy reasons and may be removed in a future release.
A string-encoded form of the error, essentially a JSON stringified copy of the entire error object.
Type:
- string
name :string
- Source:
"TDXApiError"
, indicating the error originated from this library.
Type:
- string
stack :string
- Source:
The stack trace
Type:
- string