Skip to content

Commit 1b64060

Browse files
committed
fixed tests
1 parent a87110e commit 1b64060

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

client/src/main/java/com/microsoft/durabletask/DurableTaskGrpcWorker.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ private void sendOrchestratorResponse(OrchestratorResponse response) {
476476
// No actions to chunk and the serialized response already exceeds the configured
477477
// chunk size. Sending this response as-is would likely exceed the gRPC message
478478
// size limit and fail at runtime, so fail fast with a clear error message.
479-
throw new IllegalStateException(
479+
throw new PayloadTooLargeException(
480480
"OrchestratorResponse without actions exceeds the configured chunk size (" +
481481
this.chunkSizeBytes + " bytes). Enable large-payload externalization to Azure " +
482482
"Blob Storage or reduce the size of non-action fields.");
@@ -493,7 +493,7 @@ private void sendOrchestratorResponse(OrchestratorResponse response) {
493493
int maxActionsSize = this.chunkSizeBytes - envelopeSize;
494494

495495
if (maxActionsSize <= 0) {
496-
throw new IllegalStateException(
496+
throw new PayloadTooLargeException(
497497
"OrchestratorResponse envelope exceeds gRPC message size limit. Cannot chunk.");
498498
}
499499

@@ -509,7 +509,7 @@ private void sendOrchestratorResponse(OrchestratorResponse response) {
509509
int framingOverhead = 1 + com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(actionSize);
510510
int actionWireSize = actionSize + framingOverhead;
511511
if (actionWireSize > maxActionsSize) {
512-
throw new IllegalStateException(
512+
throw new PayloadTooLargeException(
513513
"A single orchestrator action exceeds the gRPC message size limit (" +
514514
actionWireSize + " bytes). Enable large-payload externalization to Azure Blob Storage " +
515515
"to handle payloads of this size.");

0 commit comments

Comments
 (0)