decode static method

Implementation

static SubscriptionErrorMessage decode(BsatnDecoder decoder) {
  final duration = decoder.readU64();
  final requestId = decoder.readOption(() => decoder.readU32()) ?? 0;
  final queryId = decoder.readOption(() => decoder.readU32()) ?? 0;
  final tableId = decoder.readOption(() => decoder.readU32()) ?? 0;
  final error = decoder.readString();

  return SubscriptionErrorMessage(
    totalHostExecutionDurationMicros: duration,
    requestId: requestId,
    queryId: queryId,
    tableId: tableId,
    error: error,
  );
}