From c960322a8af7bd98279ed2170c85342bd89a8e37 Mon Sep 17 00:00:00 2001 From: Timur Gordon <31495328+timurgordon@users.noreply.github.com> Date: Tue, 4 Nov 2025 17:16:15 +0100 Subject: [PATCH] Fix WASM client: send timeout as u64 instead of Duration object - Changed timeout field from {secs, nanos} object to plain u64 number - Fixes 'Invalid params' error when calling job.run from WASM - Job struct expects timeout as u64 (seconds), not a Duration struct - Fixed in both run_job and create_job_with_secret methods --- clients/openrpc/src/wasm.rs | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/clients/openrpc/src/wasm.rs b/clients/openrpc/src/wasm.rs index 3a4a692..e7c84e9 100644 --- a/clients/openrpc/src/wasm.rs +++ b/clients/openrpc/src/wasm.rs @@ -268,10 +268,7 @@ impl WasmSupervisorClient { "payload": job.payload, "runner": job.runner, "executor": job.executor, - "timeout": { - "secs": job.timeout, - "nanos": 0 - }, + "timeout": job.timeout, "env_vars": serde_json::from_str::(&serde_json::to_string(&job.env_vars).unwrap_or_else(|_| "{}".to_string())).unwrap_or(serde_json::json!({})), "created_at": job.created_at, "updated_at": job.updated_at @@ -303,10 +300,7 @@ impl WasmSupervisorClient { "payload": job.payload, "runner": job.runner, "executor": job.executor, - "timeout": { - "secs": job.timeout, - "nanos": 0 - }, + "timeout": job.timeout, "env_vars": serde_json::from_str::(&serde_json::to_string(&job.env_vars).unwrap_or_else(|_| "{}".to_string())).unwrap_or(serde_json::json!({})), "created_at": job.created_at, "updated_at": job.updated_at