From 4d36d20ab7d21358ed51eb833ce3a1d76575a67e Mon Sep 17 00:00:00 2001 From: appdevelopers9a Date: Wed, 14 Jan 2026 23:10:09 +0530 Subject: [PATCH 1/2] docs: fix waitpoint token completion request body field Fixed documentation examples to use correct 'data' field instead of 'output' for the waitpoint token completion endpoint. The API schema expects 'data' in the request body, but all code examples (curl, Python, Ruby, Go) incorrectly showed 'output', causing waitpoints to complete with empty/undefined output when users followed the docs. Fixes #2872 --- docs/wait-for-token.mdx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/wait-for-token.mdx b/docs/wait-for-token.mdx index 9e050a3430..98d7ec96e7 100644 --- a/docs/wait-for-token.mdx +++ b/docs/wait-for-token.mdx @@ -177,7 +177,7 @@ You can complete a token using a raw HTTP request or from another language. curl -X POST "https://api.trigger.dev/api/v1/waitpoints/tokens/{tokenId}/complete" \ -H "Authorization: Bearer {token}" \ -H "Content-Type: application/json" \ - -d '{"output": { "status": "approved"}}' + -d '{"data": { "status": "approved"}}' ``` ```python python @@ -186,7 +186,7 @@ import requests response = requests.post( "https://api.trigger.dev/api/v1/waitpoints/tokens/{tokenId}/complete", headers={"Authorization": f"Bearer {token}"}, - json={"output": { "status": "approved"}} + json={"data": { "status": "approved"}} ) ``` @@ -199,7 +199,7 @@ http = Net::HTTP.new(uri.host, uri.port) request = Net::HTTP::Post.new(uri) request["Authorization"] = "Bearer {token}" request["Content-Type"] = "application/json" -request.body = JSON.generate({ output: { status: "approved" } }) +request.body = JSON.generate({ data: { status: "approved" } }) response = http.request(request) ``` @@ -218,7 +218,7 @@ func main() { url := "https://api.trigger.dev/api/v1/waitpoints/tokens/{tokenId}/complete" payload := map[string]interface{}{ - "output": map[string]interface{}{ + "data": map[string]interface{}{ "status": "approved", }, } From 046af66b9bddf721c1ceb003d5d80eaf7e2fdc0e Mon Sep 17 00:00:00 2001 From: ShivaReddyVanja Date: Thu, 15 Jan 2026 14:39:01 +0530 Subject: [PATCH 2/2] fix(webapp): prevent date string reformatting in log details This prevents the logger from reformatting date-like strings (e.g., "Tuesday...") into ISO format. We now prioritize rawAttributes from the backend to bypass superjson's automatic date transformation, ensuring the UI displays exactly what was logged. --- apps/webapp/app/components/logs/LogDetailView.tsx | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/apps/webapp/app/components/logs/LogDetailView.tsx b/apps/webapp/app/components/logs/LogDetailView.tsx index a367e75495..c8ea26b6f3 100644 --- a/apps/webapp/app/components/logs/LogDetailView.tsx +++ b/apps/webapp/app/components/logs/LogDetailView.tsx @@ -207,12 +207,25 @@ export function LogDetailView({ logId, initialLog, onClose, searchTerm }: LogDet function DetailsTab({ log, runPath, searchTerm }: { log: LogEntry; runPath: string; searchTerm?: string }) { const logWithExtras = log as LogEntry & { attributes?: LogAttributes; + rawAttributes?: string; }; let beautifiedAttributes: string | null = null; - if (logWithExtras.attributes) { + if (logWithExtras.rawAttributes) { + try { + // It's a string, so we need to parse it first to be able to re-stringify it with indentation + const parsed = JSON.parse(logWithExtras.rawAttributes); + beautifiedAttributes = JSON.stringify(parsed, null, 2); + } catch (e) { + beautifiedAttributes = logWithExtras.rawAttributes; + } + // We already have the raw string, so we don't need to format it again + if (beautifiedAttributes) { + beautifiedAttributes = formatStringJSON(beautifiedAttributes); + } + } else if (logWithExtras.attributes) { beautifiedAttributes = JSON.stringify(logWithExtras.attributes, null, 2); beautifiedAttributes = formatStringJSON(beautifiedAttributes); }