Skip to content

Commit c9df606

Browse files
committed
improvement(executor): say a large Function block value is too large to pass into the block
1 parent 4f2deb3 commit c9df606

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎apps/sim/executor/variables/resolver.test.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -972,7 +972,7 @@ describe('VariableResolver function block inputs', () => {
972972
'return <Producer.result>'
973973
)
974974
).rejects.toThrow(
975-
'<Producer.result> is too large to pass inline (12.0 MB). Select a smaller field, or read it in JavaScript without imports.'
975+
'<Producer.result> is 12.0 MB, too large to pass into this block. Select a smaller field, or read it in JavaScript without imports.'
976976
)
977977
})
978978

@@ -984,7 +984,7 @@ describe('VariableResolver function block inputs', () => {
984984
"import x from 'x'\nreturn <Producer.result>"
985985
)
986986
).rejects.toThrow(
987-
'<Producer.result> is too large to pass inline (12.0 MB). Select a smaller field, or read it in JavaScript without imports.'
987+
'<Producer.result> is 12.0 MB, too large to pass into this block. Select a smaller field, or read it in JavaScript without imports.'
988988
)
989989
})
990990

‎apps/sim/executor/variables/resolver.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ function appendReferencePath(reference: string, path: Array<string | number>): s
138138
/** A Function block reference points straight at a large value its runtime cannot load. */
139139
function getDirectLargeValueError(reference: string, size: number): Error {
140140
return new Error(
141-
`${reference} is too large to pass inline (${formatLargeValueSize(size)}). ${LARGE_VALUE_RUNTIME_HINT}`
141+
`${reference} is ${formatLargeValueSize(size)}, too large to pass into this block. ${LARGE_VALUE_RUNTIME_HINT}`
142142
)
143143
}
144144

0 commit comments

Comments
 (0)