fail method

void fail(
  1. ResourceTransformError error
)

Fails a resource transform request without sending it.

The library retries a request that failed for a reason it retries, such as ResourceErrorReason.connection, and the retry calls the transform again. When this call fails, the request fails with ResourceErrorReason.other, as ResourceTransformRequestHandle.release() does.

See mln_resource_transform_request_fail in the C API reference.

Implementation

void fail(ResourceTransformError error) => _state.answer(
  (handle) => withNativeArena(
    (arena) => raw.mln_resource_transform_request_fail(
      handle.raw,
      _writeResourceTransformError(error, arena),
      nativeDiagnostic,
    ),
  ),
);