DocumentTranslationError Class
This contains an outer error with error code, message, details, target and an inner error with more descriptive details.
Readonly variables are only populated by the server, and will be ignored when sending a request.
Constructor
DocumentTranslationError(*args: Any, **kwargs: Any)
Variables
| Name | Description |
|---|---|
|
code
|
Enums containing high level error codes. Required. Known values are: "InvalidRequest", "InvalidArgument", "InternalServerError", "ServiceUnavailable", "ResourceNotFound", "Unauthorized", and "RequestRateTooHigh". |
|
message
|
Gets high level error message. Required. |
|
target
|
Gets the source of the error. For example it would be "documents" or "document id" in case of invalid document. |
|
inner_error
|
New Inner Error format which conforms to Cognitive Services API Guidelines which is available at https://microsoft.sharepoint.com/%3Aw%3A/t/CognitiveServicesPMO/EUoytcrjuJdKpeOKIK_QRC8BPtUYQpKBi8JsWyeDMRsWlQ?e=CPq8ow. This contains required properties ErrorCode, message and optional properties target, details(key value pair), inner error(this can be nested). |
Methods
| as_dict |
Return a dict that can be turned into json using json.dump. |
| clear | |
| copy | |
| get | |
| items | |
| keys | |
| pop | |
| popitem | |
| setdefault | |
| update | |
| values |
as_dict
Return a dict that can be turned into json using json.dump.
as_dict(*, exclude_readonly: bool = False) -> Dict[str, Any]
Keyword-Only Parameters
| Name | Description |
|---|---|
|
exclude_readonly
|
Whether to remove the readonly properties. Default value: False
|
Returns
| Type | Description |
|---|---|
|
A dict JSON compatible object |
clear
clear() -> None
copy
copy() -> Model
get
get(key: str, default: Any = None) -> Any
Parameters
| Name | Description |
|---|---|
|
key
Required
|
|
|
default
|
Default value: None
|
items
items() -> ItemsView[str, Any]
keys
keys() -> KeysView[str]
pop
pop(key: str, default: ~typing.Any = <object object>) -> Any
Parameters
| Name | Description |
|---|---|
|
key
Required
|
|
|
default
|
|
popitem
popitem() -> Tuple[str, Any]
setdefault
setdefault(key: str, default: ~typing.Any = <object object>) -> Any
Parameters
| Name | Description |
|---|---|
|
key
Required
|
|
|
default
|
|
update
update(*args: Any, **kwargs: Any) -> None
values
values() -> ValuesView[Any]
Attributes
code
"InvalidRequest", "InvalidArgument", "InternalServerError", "ServiceUnavailable", "ResourceNotFound", "Unauthorized", and "RequestRateTooHigh".
code: str | _models.TranslationErrorCode
inner_error
New Inner Error format which conforms to Cognitive Services API Guidelines which is available at https://microsoft.sharepoint.com/%3Aw%3A/t/CognitiveServicesPMO/EUoytcrjuJdKpeOKIK_QRC8BPtUYQpKBi8JsWyeDMRsWlQ?e=CPq8ow. # pylint: disable=line-too-long This contains required properties ErrorCode, message and optional properties target, details(key value pair), inner error(this can be nested).
inner_error: _models.InnerTranslationError | None
message
Gets high level error message. Required.
message: str
target
Gets the source of the error. For example it would be "documents" or "document id" in case of invalid document.
target: str | None