| | | 1 | | namespace AsyncResponse; |
| | | 2 | | |
| | | 3 | | /// <summary>A deterministic rejection of a ledger exceeding its state store's size budget.</summary> |
| | | 4 | | public sealed class FlowStateTooLargeException : InvalidOperationException |
| | | 5 | | { |
| | | 6 | | /// <summary>Creates a size rejection with the measured size and provider budget.</summary> |
| | | 7 | | public FlowStateTooLargeException(string flowId, long serializedSizeBytes, long maxStateBytes, string providerName) |
| | 54 | 8 | | : base($"Flow '{flowId}' state serialized to {serializedSizeBytes} bytes, exceeding the {providerName} MaxStateB |
| | 54 | 9 | | "flow state exceeded the provider's size limit. Keep large payloads in your own storage and pass referenc |
| | 54 | 10 | | "see docs/durable-flows.md (ledger-size note).") |
| | | 11 | | { |
| | 54 | 12 | | FlowId = flowId; |
| | 54 | 13 | | SerializedSizeBytes = serializedSizeBytes; |
| | 54 | 14 | | MaxStateBytes = maxStateBytes; |
| | 54 | 15 | | } |
| | | 16 | | |
| | | 17 | | /// <summary>The flow whose ledger was rejected.</summary> |
| | 20 | 18 | | public string FlowId { get; } |
| | | 19 | | /// <summary>The serialized size measured by the provider.</summary> |
| | 20 | 20 | | public long SerializedSizeBytes { get; } |
| | | 21 | | /// <summary>The configured size budget.</summary> |
| | 18 | 22 | | public long MaxStateBytes { get; } |
| | | 23 | | } |