Skip to content

Commit 4301512

Browse files
committed
fix(uptimerobot): rename monitor timeout param to avoid reserved name
The tool runner treats a top-level `timeout` param as the outbound HTTP-client timeout (ms), so a monitor check-timeout of e.g. 30s would abort the API call in 30ms. Rename the input to `checkTimeout` (block subBlock, tool params, inputs, numeric coercion) and map it to the API body's `timeout` key in buildMonitorBody.
1 parent 954b068 commit 4301512

4 files changed

Lines changed: 9 additions & 7 deletions

File tree

apps/sim/blocks/blocks/uptimerobot.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ export const UptimeRobotBlock: BlockConfig<UptimeRobotMonitorResponse> = {
141141
required: { field: 'operation', value: 'create_monitor' },
142142
},
143143
{
144-
id: 'timeout',
144+
id: 'checkTimeout',
145145
title: 'Timeout (seconds)',
146146
type: 'short-input',
147147
placeholder: '0-60',
@@ -693,7 +693,7 @@ export const UptimeRobotBlock: BlockConfig<UptimeRobotMonitorResponse> = {
693693
// Numeric tool params that arrive as strings from short-input subblocks.
694694
const NUMERIC = new Set([
695695
'monitorId',
696-
'timeout',
696+
'checkTimeout',
697697
'port',
698698
'keywordCaseType',
699699
'gracePeriod',
@@ -756,7 +756,7 @@ export const UptimeRobotBlock: BlockConfig<UptimeRobotMonitorResponse> = {
756756
type: { type: 'string', description: 'Monitor type' },
757757
url: { type: 'string', description: 'URL or host (also a list filter)' },
758758
interval: { type: 'string', description: 'Check interval (seconds) or recurrence' },
759-
timeout: { type: 'number', description: 'Check timeout in seconds' },
759+
checkTimeout: { type: 'number', description: 'Check timeout in seconds' },
760760
port: { type: 'number', description: 'Port for Port/UDP monitors' },
761761
keywordType: { type: 'string', description: 'Keyword match type' },
762762
keywordValue: { type: 'string', description: 'Keyword to look for' },

apps/sim/tools/uptimerobot/create_monitor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export const uptimeRobotCreateMonitorTool: ToolConfig<
5050
visibility: 'user-or-llm',
5151
description: 'Check interval in seconds (minimum 30)',
5252
},
53-
timeout: {
53+
checkTimeout: {
5454
type: 'number',
5555
required: false,
5656
visibility: 'user-or-llm',

apps/sim/tools/uptimerobot/types.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,9 @@ export function buildMonitorBody(
259259
assignDefined(body, 'type', params.type)
260260
assignDefined(body, 'url', params.url)
261261
assignDefined(body, 'interval', params.interval)
262-
assignDefined(body, 'timeout', params.timeout)
262+
// `checkTimeout` is the API's `timeout` (seconds). The param is renamed to
263+
// avoid the tool runner's reserved `timeout` (outbound HTTP-client timeout).
264+
assignDefined(body, 'timeout', params.checkTimeout)
263265
assignDefined(body, 'port', params.port)
264266
assignDefined(body, 'keywordType', params.keywordType)
265267
assignDefined(body, 'keywordValue', params.keywordValue)
@@ -777,7 +779,7 @@ export interface UptimeRobotCreateMonitorParams extends UptimeRobotBaseParams {
777779
type: string
778780
url?: string
779781
interval: number
780-
timeout?: number
782+
checkTimeout?: number
781783
port?: number
782784
keywordType?: string
783785
keywordValue?: string

apps/sim/tools/uptimerobot/update_monitor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export const uptimeRobotUpdateMonitorTool: ToolConfig<
5050
visibility: 'user-or-llm',
5151
description: 'New check interval in seconds (minimum 30)',
5252
},
53-
timeout: {
53+
checkTimeout: {
5454
type: 'number',
5555
required: false,
5656
visibility: 'user-or-llm',

0 commit comments

Comments
 (0)