getOperation
Асинхронные методы API возвращают результат до завершения обработки. Используйте getOperation
, чтобы получить статус асинхронной операции, используя ее operationId
.
Сигнатура метода
public Operation getOperation( GetOperationRequest request) throws CommonException;
Получить запрос операции
Имя свойства | Ценить | Необходимый | Описание |
---|
operationId | string | Да | Идентификатор операции. |
Поведение при ошибке
В случае возникновения ошибки библиотека выдает CommonException
, содержащий один из следующих кодов ошибки:
Код ошибки |
---|
AUTHORIZATION_FAIL (если торговый посредник не является владельцем операции) |
INTERNAL_SERVER_ERROR |
INVALID_OPERATION_ID |
Если не указано иное, контент на этой странице предоставляется по лицензии Creative Commons "С указанием авторства 4.0", а примеры кода – по лицензии Apache 2.0. Подробнее об этом написано в правилах сайта. Java – это зарегистрированный товарный знак корпорации Oracle и ее аффилированных лиц.
Последнее обновление: 2024-11-14 UTC.
[null,null,["Последнее обновление: 2024-11-14 UTC."],[[["Asynchronous API methods use `getOperation` to check the status of an operation."],["The `getOperation` method requires the `operationId` as a string in the `GetOperationRequest`."],["`CommonException` is thrown if an error occurs during the operation."],["Possible error codes include `AUTHORIZATION_FAIL`, `INTERNAL_SERVER_ERROR`, and `INVALID_OPERATION_ID`."]]],["Asynchronous operations are tracked using `getOperation`, which requires an `operationId` to check their status. The `getOperation` method, part of the API, takes a `GetOperationRequest` and can throw a `CommonException`. Possible errors include `AUTHORIZATION_FAIL` (if the caller lacks ownership), `INTERNAL_SERVER_ERROR`, and `INVALID_OPERATION_ID`. The method returns before the operation is completed, allowing users to periodically retrieve updates via `getOperation`.\n"]]