Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion apps/sim/executor/handlers/generic/generic-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { isDeepStrictEqual } from 'node:util'
import { createLogger } from '@sim/logger'
import { toError } from '@sim/utils/errors'
import { isPlainRecord } from '@sim/utils/object'
import { NonRetryableExecutionError } from '@/lib/execution/non-retryable-error'
import { getBlock } from '@/blocks/index'
import { isMcpTool } from '@/executor/constants'
import type { BlockHandler, BlockNodeMetadata, ExecutionContext } from '@/executor/types'
Expand Down Expand Up @@ -345,7 +346,10 @@ export class GenericBlockHandler implements BlockHandler {
? errorDetails.join(' - ')
: `Block execution of ${tool?.name || block.config.tool} failed with no error message`

const error = new Error(errorMessage)
const error =
result.retryable === false
? new NonRetryableExecutionError(errorMessage)
: new Error(errorMessage)

Object.assign(error, {
toolId: block.config.tool,
Expand Down
Loading