sendDurableExecutionCallbackFailure method

Future<void> sendDurableExecutionCallbackFailure({
  1. required String callbackId,
  2. ErrorObject? error,
})

Sends a failure response for a callback operation in a durable execution. Use this API when an external system cannot complete a callback operation successfully.

May throw CallbackTimeoutException. May throw InvalidParameterValueException. May throw ServiceException. May throw TooManyRequestsException.

Parameter callbackId : The unique identifier for the callback operation.

Parameter error : Error details describing why the callback operation failed.

Implementation

Future<void> sendDurableExecutionCallbackFailure({
  required String callbackId,
  ErrorObject? error,
}) async {
  final response = await _protocol.send(
    payload: error,
    method: 'POST',
    requestUri:
        '/2025-12-01/durable-execution-callbacks/${Uri.encodeComponent(callbackId)}/fail',
    exceptionFnMap: _exceptionFns,
  );
}