Additional error debugging when failing to validate server response - #647

Merged
TooTallNate merged 2 commits into
mainfrom
12-18-additional_error_debugging_when_failing_to_validate_server_response
Dec 18, 2025
Merged

Additional error debugging when failing to validate server response#647
TooTallNate merged 2 commits into
mainfrom
12-18-additional_error_debugging_when_failing_to_validate_server_response

Conversation

@TooTallNate

@TooTallNateTooTallNate commented Dec 18, 2025

Copy link
Copy Markdown
Member

Enhanced error debugging for server response validation in the Vercel world package.

What changed?

  • Improved error handling in the makeRequest function:
    • Created a separate Request object for better error reporting
    • Captured the response text before attempting to parse it
    • Enhanced error messages to include the response body when validation fails
    • Simplified error handling by removing the specific ZodError case

How to test?

  1. Make a request that returns an invalid response format
  2. Check the error message in the console, which should now include:
    • The HTTP method and endpoint
    • The detailed error message
    • The full response body for debugging

Why make this change?

This change makes it easier to debug issues when the server returns responses that don't match the expected schema. By including the full response body in the error message, developers can more quickly identify what's wrong with the response format without needing additional debugging steps.

@changeset-bot

changeset-botBot commented Dec 18, 2025

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 709e0e2

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 13 packages
NameType
@workflow/world-vercelPatch
@workflow/cliPatch
@workflow/corePatch
workflowPatch
@workflow/world-testingPatch
@workflow/buildersPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/web-sharedPatch
@workflow/aiPatch
@workflow/astroPatch
@workflow/sveltekitPatch
@workflow/nuxtPatch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel

vercelBot commented Dec 18, 2025

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Dec 18, 2025

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production286011297
✅ 💻 Local Development26208270
✅ 📦 Local Production26208270
✅ 🐘 Local Postgres26208270
✅ 🪟 Windows270027
❌ 🌍 Community Worlds109110120
Total120811351254

❌ Failed Tests

🌍 Community Worlds (11 failed)

mongodb (1 failed):

  • webhookWorkflow

redis (1 failed):

  • webhookWorkflow

starter (8 failed):

  • addTenWorkflow
  • addTenWorkflow
  • retryAttemptCounterWorkflow
  • crossFileErrorWorkflow - stack traces work across imported modules
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step

turso (1 failed):

  • webhookWorkflow

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro2601
✅ example2601
✅ express2601
✅ fastify2601
✅ hono2601
✅ nextjs-turbopack2601
✅ nextjs-webpack2601
✅ nitro2601
✅ nuxt2601
✅ sveltekit2601
✅ vite2601
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable2601
✅ express-stable2601
✅ fastify-stable2601
✅ hono-stable2601
✅ nextjs-turbopack-stable2700
✅ nextjs-webpack-stable2700
✅ nitro-stable2601
✅ nuxt-stable2601
✅ sveltekit-stable2601
✅ vite-stable2601
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable2601
✅ express-stable2601
✅ fastify-stable2601
✅ hono-stable2601
✅ nextjs-turbopack-stable2700
✅ nextjs-webpack-stable2700
✅ nitro-stable2601
✅ nuxt-stable2601
✅ sveltekit-stable2601
✅ vite-stable2601
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable2601
✅ express-stable2601
✅ fastify-stable2601
✅ hono-stable2601
✅ nextjs-turbopack-stable2700
✅ nextjs-webpack-stable2700
✅ nitro-stable2601
✅ nuxt-stable2601
✅ sveltekit-stable2601
✅ vite-stable2601
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack2700
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
❌ mongodb2610
✅ redis-dev300
❌ redis2610
✅ starter-dev300
❌ starter1980
✅ turso-dev300
❌ turso2610

📋 View full workflow run

@github-actions

github-actionsBot commented Dec 18, 2025

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

📈 Comparing against baseline from main branch. Green 🟢 = faster, Red 🔺 = slower.

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)0.037s (-4.8%)1.014s (~)0.976s101.00x
💻 LocalNext.js (Turbopack)0.040s (-2.0%)1.017s (~)0.977s101.07x
💻 LocalNitro0.043s (+1.2%)1.007s (~)0.964s101.14x
💻 LocalExpress0.043s (~)1.007s (~)0.964s101.16x
🌐 RedisNext.js (Turbopack)0.043s (+4.1%)1.018s (~)0.974s101.16x
🌐 MongoDBNext.js (Turbopack)0.052s (-32.9% 🟢)1.014s (~)0.962s101.40x
🌐 TursoNext.js (Turbopack)0.108s (+3.5%)1.014s (~)0.906s102.88x
🐘 PostgresNext.js (Turbopack)0.190s (+68.7% 🔺)1.021s (~)0.831s105.07x
🐘 PostgresNitro0.191s (-42.4% 🟢)1.029s (~)0.838s105.10x
🐘 PostgresExpress0.347s (+3.3%)1.012s (~)0.665s109.29x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)0.539s (-38.4% 🟢)1.452s (-20.0% 🟢)0.912s101.00x
▲ VercelNitro0.575s (+15.3% 🔺)1.448s (+4.7%)0.873s101.07x
▲ VercelExpress0.596s (-9.7% 🟢)1.606s (-21.0% 🟢)1.010s101.10x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)1.080s (-1.1%)2.012s (~)0.932s101.00x
💻 LocalNext.js (Turbopack)1.097s (~)2.012s (~)0.914s101.02x
🌐 RedisNext.js (Turbopack)1.100s (~)2.014s (~)0.914s101.02x
💻 LocalExpress1.112s (~)2.007s (~)0.895s101.03x
💻 LocalNitro1.116s (+0.5%)2.006s (~)0.890s101.03x
🌐 MongoDBNext.js (Turbopack)1.288s (-1.5%)2.012s (~)0.724s101.19x
🌐 TursoNext.js (Turbopack)1.310s (+0.9%)2.012s (~)0.702s101.21x
🐘 PostgresNext.js (Turbopack)2.042s (-16.3% 🟢)2.317s (-23.2% 🟢)0.275s101.89x
🐘 PostgresExpress2.196s (~)3.015s (~)0.818s102.03x
🐘 PostgresNitro2.438s (-0.6%)3.015s (~)0.577s102.26x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.581s (-0.6%)3.587s (+2.0%)1.006s101.00x
▲ VercelNitro2.659s (-2.3%)3.528s (~)0.869s101.03x
▲ VercelExpress2.677s (+1.2%)3.663s (+0.9%)0.986s101.04x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)10.603s (~)11.012s (~)0.409s51.00x
💻 LocalNext.js (Turbopack)10.643s (~)11.018s (~)0.375s51.00x
🌐 RedisNext.js (Turbopack)10.695s (~)11.018s (~)0.323s51.01x
💻 LocalExpress10.787s (~)11.013s (~)0.226s51.02x
💻 LocalNitro10.788s (~)11.012s (~)0.223s51.02x
🌐 MongoDBNext.js (Turbopack)12.208s (-0.8%)13.023s (~)0.815s51.15x
🌐 TursoNext.js (Turbopack)12.222s (~)13.027s (~)0.805s51.15x
🐘 PostgresNext.js (Turbopack)15.242s (-24.8% 🟢)16.031s (-23.8% 🟢)0.788s51.44x
🐘 PostgresNitro20.305s (~)21.040s (~)0.735s51.92x
🐘 PostgresExpress20.356s (~)21.032s (~)0.676s51.92x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro21.551s (~)22.449s (+0.6%)0.898s51.00x
▲ VercelNext.js (Turbopack)21.645s (-5.2% 🟢)22.170s (-6.3% 🟢)0.524s51.00x
▲ VercelExpress22.750s (+5.0%)23.636s (+5.4% 🔺)0.886s51.06x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)1.350s (~)2.008s (~)0.658s151.00x
🌐 RedisNext.js (Turbopack)1.383s (+2.0%)2.011s (~)0.628s151.02x
💻 LocalNitro1.400s (~)2.005s (~)0.605s151.04x
💻 LocalNext.js (Turbopack)1.401s (+1.7%)2.011s (~)0.610s151.04x
💻 LocalExpress1.412s (-0.5%)2.006s (~)0.594s151.05x
🐘 PostgresNext.js (Turbopack)1.987s (-21.8% 🟢)2.405s (-20.2% 🟢)0.418s131.47x
🌐 MongoDBNext.js (Turbopack)2.114s (-2.0%)3.016s (~)0.902s101.57x
🌐 TursoNext.js (Turbopack)2.228s (+2.0%)3.013s (~)0.785s101.65x
🐘 PostgresExpress2.456s (-1.5%)3.012s (~)0.556s101.82x
🐘 PostgresNitro2.670s (+0.8%)3.014s (~)0.345s101.98x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.290s (+16.9% 🔺)4.317s (+14.7% 🔺)1.028s81.00x
▲ VercelNext.js (Turbopack)9.668s (+241.1% 🔺)10.469s (+185.6% 🔺)0.801s32.94x
▲ VercelNitro10.037s (+261.6% 🔺)10.683s (+190.8% 🔺)0.646s33.05x

🔍 Observability: Express | Next.js (Turbopack) | Nitro

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.151s (+2.9%)3.035s (+3.0%)0.884s101.00x
💻 LocalNitro2.177s (-1.1%)3.148s (~)0.971s101.01x
💻 LocalExpress2.235s (-1.0%)3.184s (-0.5%)0.949s101.04x
🌐 StarterNext.js (Turbopack)2.447s (~)3.009s (~)0.562s101.14x
🌐 RedisNext.js (Turbopack)2.510s (+0.8%)3.019s (~)0.509s101.17x
🐘 PostgresNext.js (Turbopack)2.637s (-3.2%)3.021s (~)0.384s101.23x
🐘 PostgresExpress2.859s (-2.5%)3.012s (-3.2%)0.153s101.33x
🐘 PostgresNitro2.961s (-1.8%)3.113s (-13.0% 🟢)0.151s101.38x
🌐 TursoNext.js (Turbopack)4.729s (+1.3%)5.185s (~)0.456s62.20x
🌐 MongoDBNext.js (Turbopack)4.782s (+2.8%)5.185s (~)0.403s62.22x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.984s (-23.1% 🟢)3.770s (-21.4% 🟢)0.786s81.00x
▲ VercelNitro4.269s (+10.2% 🔺)5.033s (+13.4% 🔺)0.764s61.43x
▲ VercelNext.js (Turbopack)4.826s (+37.7% 🔺)5.397s (+32.4% 🔺)0.570s61.62x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)1.354s (-1.5%)2.007s (~)0.653s151.00x
🌐 RedisNext.js (Turbopack)1.393s (+1.2%)2.012s (~)0.618s151.03x
💻 LocalNext.js (Turbopack)1.408s (+1.5%)2.013s (~)0.606s151.04x
💻 LocalNitro1.409s (+0.5%)2.005s (~)0.596s151.04x
💻 LocalExpress1.431s (~)2.006s (~)0.576s151.06x
🐘 PostgresExpress1.686s (-20.9% 🟢)2.011s (-31.3% 🟢)0.325s151.25x
🐘 PostgresNext.js (Turbopack)1.722s (+4.5%)2.012s (~)0.290s151.27x
🐘 PostgresNitro1.988s (+6.9% 🔺)2.597s (+29.3% 🔺)0.609s121.47x
🌐 MongoDBNext.js (Turbopack)2.144s (+0.8%)3.012s (~)0.867s101.58x
🌐 TursoNext.js (Turbopack)2.225s (~)3.013s (~)0.788s101.64x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.650s (-1.3%)3.679s (~)1.029s91.00x
▲ VercelNitro2.653s (+1.0%)3.649s (+1.1%)0.996s91.00x
▲ VercelNext.js (Turbopack)2.849s (+7.5% 🔺)3.685s (+2.3%)0.836s91.08x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.125s (+3.9%)3.008s (+4.4%)0.883s111.00x
💻 LocalNitro2.237s (+1.9%)3.201s (+2.1%)0.964s101.05x
💻 LocalExpress2.279s (-1.4%)3.205s (-1.5%)0.926s101.07x
🌐 StarterNext.js (Turbopack)2.464s (~)3.011s (~)0.547s101.16x
🌐 RedisNext.js (Turbopack)2.538s (+1.8%)3.024s (~)0.487s101.19x
🐘 PostgresNext.js (Turbopack)2.661s (+6.2% 🔺)3.020s (~)0.359s101.25x
🐘 PostgresExpress2.739s (-7.1% 🟢)3.016s (-6.4% 🟢)0.277s101.29x
🐘 PostgresNitro2.878s (+10.9% 🔺)3.466s (+14.6% 🔺)0.588s91.35x
🌐 TursoNext.js (Turbopack)4.787s (+2.7%)5.185s (~)0.398s62.25x
🌐 MongoDBNext.js (Turbopack)4.812s (+1.3%)5.179s (~)0.367s62.26x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.186s (-1.3%)3.857s (-1.4%)0.671s81.00x
▲ VercelNitro3.309s (-7.3% 🟢)3.880s (-6.2% 🟢)0.571s81.04x
▲ VercelNext.js (Turbopack)3.477s (+7.2% 🔺)4.009s (+6.9% 🔺)0.532s81.09x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)0.136s (+9.3% 🔺)1.006s (~)0.000s (NaN%)1.012s (~)0.877s101.00x
💻 LocalNext.js (Turbopack)0.142s (+1.4%)1.003s (~)0.019s (+24.5% 🔺)1.031s (~)0.889s101.04x
🌐 RedisNext.js (Turbopack)0.157s (~)1.005s (~)0.000s (+Infinity% 🔺)1.014s (~)0.857s101.16x
💻 LocalNitro0.177s (+1.5%)0.992s (~)0.016s (+12.7% 🔺)1.022s (~)0.845s101.30x
💻 LocalExpress0.177s (~)0.992s (~)0.017s (+3.7%)1.024s (~)0.847s101.31x
🌐 TursoNext.js (Turbopack)0.503s (+10.5% 🔺)0.948s (-4.8%)0.000s (NaN%)1.013s (~)0.510s103.71x
🌐 MongoDBNext.js (Turbopack)0.513s (+3.5%)0.935s (-2.1%)0.000s (-50.0% 🟢)1.013s (~)0.500s103.78x
🐘 PostgresNext.js (Turbopack)1.121s (-50.8% 🟢)1.929s (-30.4% 🟢)0.000s (~)2.019s (-33.1% 🟢)0.898s108.26x
🐘 PostgresNitro2.225s (+2.2%)2.821s (-1.5%)0.000s (+Infinity% 🔺)3.016s (~)0.791s1016.40x
🐘 PostgresExpress2.382s (~)2.661s (~)0.000s (-100.0% 🟢)3.014s (~)0.632s1017.55x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.637s (-0.8%)3.199s (+5.1% 🔺)0.244s (-51.5% 🟢)3.838s (-3.7%)1.201s101.00x
▲ VercelNitro2.728s (+7.0% 🔺)3.094s (+0.9%)0.890s (+162.3% 🔺)4.450s (+17.8% 🔺)1.722s101.03x
▲ VercelExpress6.451s (+150.9% 🔺)5.995s (+92.2% 🔺)0.418s (+6.1% 🔺)7.840s (+99.4% 🔺)1.389s102.45x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)7/8
🐘 PostgresNext.js (Turbopack)7/8
▲ VercelExpress4/8
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local8/8
Next.js (Turbopack)🌐 Starter6/8
Nitro💻 Local8/8
Column Definitions
  • Workflow Time: Runtime reported by workflow (completedAt - createdAt) - primary metric
  • TTFB: Time to First Byte - time from workflow start until first stream byte received (stream benchmarks only)
  • Slurp: Time from first byte to complete stream consumption (stream benchmarks only)
  • Wall Time: Total testbench time (trigger workflow + poll for result)
  • Overhead: Testbench overhead (Wall Time - Workflow Time)
  • Samples: Number of benchmark iterations run
  • vs Fastest: How much slower compared to the fastest configuration for this benchmark

Worlds:

  • 💻 Local: In-memory filesystem world (local development)
  • 🐘 Postgres: PostgreSQL database world (local development)
  • ▲ Vercel: Vercel production/preview deployment
  • 🌐 Starter: Community world (local development)
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)

📋 View full workflow run

@TooTallNateGraphite App

TooTallNate commented Dec 18, 2025

Copy link
Copy Markdown
MemberAuthor

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enhances error debugging for server response validation in the Vercel world package by improving error messages and capturing response bodies when validation fails.

Key Changes:

  • Refactored makeRequest to use a Request object for better error reporting consistency
  • Enhanced error messages to include the full response body and detailed error information when schema validation fails
  • Removed unused ZodError import and simplified error handling logic

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

FileDescription
packages/world-vercel/src/utils.tsImproved error handling in the makeRequest function with better error messages and response body capture
.changeset/whole-lights-camp.mdAdds changeset entry for the patch release documenting the error debugging improvements

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment threadpackages/world-vercel/src/utils.ts
Comment threadpackages/world-vercel/src/utils.ts
);
}

const text = await response.text();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't this be in the try-catch?

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need text in the catch handler, so I think this is fine.

@TooTallNate
TooTallNate merged commit 6cd1a47 into mainDec 18, 2025
157 of 159 checks passed
@TooTallNate
TooTallNate deleted the 12-18-additional_error_debugging_when_failing_to_validate_server_response branch December 18, 2025 23:17
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@TooTallNate@adriandlam
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content

Additional error debugging when failing to validate server response - #647

Merged
TooTallNate merged 2 commits into
mainfrom
12-18-additional_error_debugging_when_failing_to_validate_server_response
Dec 18, 2025
Merged

Additional error debugging when failing to validate server response#647
TooTallNate merged 2 commits into
mainfrom
12-18-additional_error_debugging_when_failing_to_validate_server_response

Conversation

@TooTallNate

@TooTallNateTooTallNate commented Dec 18, 2025

Copy link
Copy Markdown
Member

Enhanced error debugging for server response validation in the Vercel world package.

What changed?

  • Improved error handling in the makeRequest function:
    • Created a separate Request object for better error reporting
    • Captured the response text before attempting to parse it
    • Enhanced error messages to include the response body when validation fails
    • Simplified error handling by removing the specific ZodError case

How to test?

  1. Make a request that returns an invalid response format
  2. Check the error message in the console, which should now include:
    • The HTTP method and endpoint
    • The detailed error message
    • The full response body for debugging

Why make this change?

This change makes it easier to debug issues when the server returns responses that don't match the expected schema. By including the full response body in the error message, developers can more quickly identify what's wrong with the response format without needing additional debugging steps.

@changeset-bot

changeset-botBot commented Dec 18, 2025

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 709e0e2

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 13 packages
NameType
@workflow/world-vercelPatch
@workflow/cliPatch
@workflow/corePatch
workflowPatch
@workflow/world-testingPatch
@workflow/buildersPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/web-sharedPatch
@workflow/aiPatch
@workflow/astroPatch
@workflow/sveltekitPatch
@workflow/nuxtPatch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel

vercelBot commented Dec 18, 2025

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Dec 18, 2025

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production286011297
✅ 💻 Local Development26208270
✅ 📦 Local Production26208270
✅ 🐘 Local Postgres26208270
✅ 🪟 Windows270027
❌ 🌍 Community Worlds109110120
Total120811351254

❌ Failed Tests

🌍 Community Worlds (11 failed)

mongodb (1 failed):

  • webhookWorkflow

redis (1 failed):

  • webhookWorkflow

starter (8 failed):

  • addTenWorkflow
  • addTenWorkflow
  • retryAttemptCounterWorkflow
  • crossFileErrorWorkflow - stack traces work across imported modules
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step

turso (1 failed):

  • webhookWorkflow

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro2601
✅ example2601
✅ express2601
✅ fastify2601
✅ hono2601
✅ nextjs-turbopack2601
✅ nextjs-webpack2601
✅ nitro2601
✅ nuxt2601
✅ sveltekit2601
✅ vite2601
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable2601
✅ express-stable2601
✅ fastify-stable2601
✅ hono-stable2601
✅ nextjs-turbopack-stable2700
✅ nextjs-webpack-stable2700
✅ nitro-stable2601
✅ nuxt-stable2601
✅ sveltekit-stable2601
✅ vite-stable2601
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable2601
✅ express-stable2601
✅ fastify-stable2601
✅ hono-stable2601
✅ nextjs-turbopack-stable2700
✅ nextjs-webpack-stable2700
✅ nitro-stable2601
✅ nuxt-stable2601
✅ sveltekit-stable2601
✅ vite-stable2601
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable2601
✅ express-stable2601
✅ fastify-stable2601
✅ hono-stable2601
✅ nextjs-turbopack-stable2700
✅ nextjs-webpack-stable2700
✅ nitro-stable2601
✅ nuxt-stable2601
✅ sveltekit-stable2601
✅ vite-stable2601
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack2700
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
❌ mongodb2610
✅ redis-dev300
❌ redis2610
✅ starter-dev300
❌ starter1980
✅ turso-dev300
❌ turso2610

📋 View full workflow run

@github-actions

github-actionsBot commented Dec 18, 2025

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

📈 Comparing against baseline from main branch. Green 🟢 = faster, Red 🔺 = slower.

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)0.037s (-4.8%)1.014s (~)0.976s101.00x
💻 LocalNext.js (Turbopack)0.040s (-2.0%)1.017s (~)0.977s101.07x
💻 LocalNitro0.043s (+1.2%)1.007s (~)0.964s101.14x
💻 LocalExpress0.043s (~)1.007s (~)0.964s101.16x
🌐 RedisNext.js (Turbopack)0.043s (+4.1%)1.018s (~)0.974s101.16x
🌐 MongoDBNext.js (Turbopack)0.052s (-32.9% 🟢)1.014s (~)0.962s101.40x
🌐 TursoNext.js (Turbopack)0.108s (+3.5%)1.014s (~)0.906s102.88x
🐘 PostgresNext.js (Turbopack)0.190s (+68.7% 🔺)1.021s (~)0.831s105.07x
🐘 PostgresNitro0.191s (-42.4% 🟢)1.029s (~)0.838s105.10x
🐘 PostgresExpress0.347s (+3.3%)1.012s (~)0.665s109.29x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)0.539s (-38.4% 🟢)1.452s (-20.0% 🟢)0.912s101.00x
▲ VercelNitro0.575s (+15.3% 🔺)1.448s (+4.7%)0.873s101.07x
▲ VercelExpress0.596s (-9.7% 🟢)1.606s (-21.0% 🟢)1.010s101.10x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)1.080s (-1.1%)2.012s (~)0.932s101.00x
💻 LocalNext.js (Turbopack)1.097s (~)2.012s (~)0.914s101.02x
🌐 RedisNext.js (Turbopack)1.100s (~)2.014s (~)0.914s101.02x
💻 LocalExpress1.112s (~)2.007s (~)0.895s101.03x
💻 LocalNitro1.116s (+0.5%)2.006s (~)0.890s101.03x
🌐 MongoDBNext.js (Turbopack)1.288s (-1.5%)2.012s (~)0.724s101.19x
🌐 TursoNext.js (Turbopack)1.310s (+0.9%)2.012s (~)0.702s101.21x
🐘 PostgresNext.js (Turbopack)2.042s (-16.3% 🟢)2.317s (-23.2% 🟢)0.275s101.89x
🐘 PostgresExpress2.196s (~)3.015s (~)0.818s102.03x
🐘 PostgresNitro2.438s (-0.6%)3.015s (~)0.577s102.26x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.581s (-0.6%)3.587s (+2.0%)1.006s101.00x
▲ VercelNitro2.659s (-2.3%)3.528s (~)0.869s101.03x
▲ VercelExpress2.677s (+1.2%)3.663s (+0.9%)0.986s101.04x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)10.603s (~)11.012s (~)0.409s51.00x
💻 LocalNext.js (Turbopack)10.643s (~)11.018s (~)0.375s51.00x
🌐 RedisNext.js (Turbopack)10.695s (~)11.018s (~)0.323s51.01x
💻 LocalExpress10.787s (~)11.013s (~)0.226s51.02x
💻 LocalNitro10.788s (~)11.012s (~)0.223s51.02x
🌐 MongoDBNext.js (Turbopack)12.208s (-0.8%)13.023s (~)0.815s51.15x
🌐 TursoNext.js (Turbopack)12.222s (~)13.027s (~)0.805s51.15x
🐘 PostgresNext.js (Turbopack)15.242s (-24.8% 🟢)16.031s (-23.8% 🟢)0.788s51.44x
🐘 PostgresNitro20.305s (~)21.040s (~)0.735s51.92x
🐘 PostgresExpress20.356s (~)21.032s (~)0.676s51.92x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro21.551s (~)22.449s (+0.6%)0.898s51.00x
▲ VercelNext.js (Turbopack)21.645s (-5.2% 🟢)22.170s (-6.3% 🟢)0.524s51.00x
▲ VercelExpress22.750s (+5.0%)23.636s (+5.4% 🔺)0.886s51.06x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)1.350s (~)2.008s (~)0.658s151.00x
🌐 RedisNext.js (Turbopack)1.383s (+2.0%)2.011s (~)0.628s151.02x
💻 LocalNitro1.400s (~)2.005s (~)0.605s151.04x
💻 LocalNext.js (Turbopack)1.401s (+1.7%)2.011s (~)0.610s151.04x
💻 LocalExpress1.412s (-0.5%)2.006s (~)0.594s151.05x
🐘 PostgresNext.js (Turbopack)1.987s (-21.8% 🟢)2.405s (-20.2% 🟢)0.418s131.47x
🌐 MongoDBNext.js (Turbopack)2.114s (-2.0%)3.016s (~)0.902s101.57x
🌐 TursoNext.js (Turbopack)2.228s (+2.0%)3.013s (~)0.785s101.65x
🐘 PostgresExpress2.456s (-1.5%)3.012s (~)0.556s101.82x
🐘 PostgresNitro2.670s (+0.8%)3.014s (~)0.345s101.98x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.290s (+16.9% 🔺)4.317s (+14.7% 🔺)1.028s81.00x
▲ VercelNext.js (Turbopack)9.668s (+241.1% 🔺)10.469s (+185.6% 🔺)0.801s32.94x
▲ VercelNitro10.037s (+261.6% 🔺)10.683s (+190.8% 🔺)0.646s33.05x

🔍 Observability: Express | Next.js (Turbopack) | Nitro

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.151s (+2.9%)3.035s (+3.0%)0.884s101.00x
💻 LocalNitro2.177s (-1.1%)3.148s (~)0.971s101.01x
💻 LocalExpress2.235s (-1.0%)3.184s (-0.5%)0.949s101.04x
🌐 StarterNext.js (Turbopack)2.447s (~)3.009s (~)0.562s101.14x
🌐 RedisNext.js (Turbopack)2.510s (+0.8%)3.019s (~)0.509s101.17x
🐘 PostgresNext.js (Turbopack)2.637s (-3.2%)3.021s (~)0.384s101.23x
🐘 PostgresExpress2.859s (-2.5%)3.012s (-3.2%)0.153s101.33x
🐘 PostgresNitro2.961s (-1.8%)3.113s (-13.0% 🟢)0.151s101.38x
🌐 TursoNext.js (Turbopack)4.729s (+1.3%)5.185s (~)0.456s62.20x
🌐 MongoDBNext.js (Turbopack)4.782s (+2.8%)5.185s (~)0.403s62.22x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.984s (-23.1% 🟢)3.770s (-21.4% 🟢)0.786s81.00x
▲ VercelNitro4.269s (+10.2% 🔺)5.033s (+13.4% 🔺)0.764s61.43x
▲ VercelNext.js (Turbopack)4.826s (+37.7% 🔺)5.397s (+32.4% 🔺)0.570s61.62x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)1.354s (-1.5%)2.007s (~)0.653s151.00x
🌐 RedisNext.js (Turbopack)1.393s (+1.2%)2.012s (~)0.618s151.03x
💻 LocalNext.js (Turbopack)1.408s (+1.5%)2.013s (~)0.606s151.04x
💻 LocalNitro1.409s (+0.5%)2.005s (~)0.596s151.04x
💻 LocalExpress1.431s (~)2.006s (~)0.576s151.06x
🐘 PostgresExpress1.686s (-20.9% 🟢)2.011s (-31.3% 🟢)0.325s151.25x
🐘 PostgresNext.js (Turbopack)1.722s (+4.5%)2.012s (~)0.290s151.27x
🐘 PostgresNitro1.988s (+6.9% 🔺)2.597s (+29.3% 🔺)0.609s121.47x
🌐 MongoDBNext.js (Turbopack)2.144s (+0.8%)3.012s (~)0.867s101.58x
🌐 TursoNext.js (Turbopack)2.225s (~)3.013s (~)0.788s101.64x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.650s (-1.3%)3.679s (~)1.029s91.00x
▲ VercelNitro2.653s (+1.0%)3.649s (+1.1%)0.996s91.00x
▲ VercelNext.js (Turbopack)2.849s (+7.5% 🔺)3.685s (+2.3%)0.836s91.08x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.125s (+3.9%)3.008s (+4.4%)0.883s111.00x
💻 LocalNitro2.237s (+1.9%)3.201s (+2.1%)0.964s101.05x
💻 LocalExpress2.279s (-1.4%)3.205s (-1.5%)0.926s101.07x
🌐 StarterNext.js (Turbopack)2.464s (~)3.011s (~)0.547s101.16x
🌐 RedisNext.js (Turbopack)2.538s (+1.8%)3.024s (~)0.487s101.19x
🐘 PostgresNext.js (Turbopack)2.661s (+6.2% 🔺)3.020s (~)0.359s101.25x
🐘 PostgresExpress2.739s (-7.1% 🟢)3.016s (-6.4% 🟢)0.277s101.29x
🐘 PostgresNitro2.878s (+10.9% 🔺)3.466s (+14.6% 🔺)0.588s91.35x
🌐 TursoNext.js (Turbopack)4.787s (+2.7%)5.185s (~)0.398s62.25x
🌐 MongoDBNext.js (Turbopack)4.812s (+1.3%)5.179s (~)0.367s62.26x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.186s (-1.3%)3.857s (-1.4%)0.671s81.00x
▲ VercelNitro3.309s (-7.3% 🟢)3.880s (-6.2% 🟢)0.571s81.04x
▲ VercelNext.js (Turbopack)3.477s (+7.2% 🔺)4.009s (+6.9% 🔺)0.532s81.09x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)0.136s (+9.3% 🔺)1.006s (~)0.000s (NaN%)1.012s (~)0.877s101.00x
💻 LocalNext.js (Turbopack)0.142s (+1.4%)1.003s (~)0.019s (+24.5% 🔺)1.031s (~)0.889s101.04x
🌐 RedisNext.js (Turbopack)0.157s (~)1.005s (~)0.000s (+Infinity% 🔺)1.014s (~)0.857s101.16x
💻 LocalNitro0.177s (+1.5%)0.992s (~)0.016s (+12.7% 🔺)1.022s (~)0.845s101.30x
💻 LocalExpress0.177s (~)0.992s (~)0.017s (+3.7%)1.024s (~)0.847s101.31x
🌐 TursoNext.js (Turbopack)0.503s (+10.5% 🔺)0.948s (-4.8%)0.000s (NaN%)1.013s (~)0.510s103.71x
🌐 MongoDBNext.js (Turbopack)0.513s (+3.5%)0.935s (-2.1%)0.000s (-50.0% 🟢)1.013s (~)0.500s103.78x
🐘 PostgresNext.js (Turbopack)1.121s (-50.8% 🟢)1.929s (-30.4% 🟢)0.000s (~)2.019s (-33.1% 🟢)0.898s108.26x
🐘 PostgresNitro2.225s (+2.2%)2.821s (-1.5%)0.000s (+Infinity% 🔺)3.016s (~)0.791s1016.40x
🐘 PostgresExpress2.382s (~)2.661s (~)0.000s (-100.0% 🟢)3.014s (~)0.632s1017.55x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.637s (-0.8%)3.199s (+5.1% 🔺)0.244s (-51.5% 🟢)3.838s (-3.7%)1.201s101.00x
▲ VercelNitro2.728s (+7.0% 🔺)3.094s (+0.9%)0.890s (+162.3% 🔺)4.450s (+17.8% 🔺)1.722s101.03x
▲ VercelExpress6.451s (+150.9% 🔺)5.995s (+92.2% 🔺)0.418s (+6.1% 🔺)7.840s (+99.4% 🔺)1.389s102.45x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)7/8
🐘 PostgresNext.js (Turbopack)7/8
▲ VercelExpress4/8
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local8/8
Next.js (Turbopack)🌐 Starter6/8
Nitro💻 Local8/8
Column Definitions
  • Workflow Time: Runtime reported by workflow (completedAt - createdAt) - primary metric
  • TTFB: Time to First Byte - time from workflow start until first stream byte received (stream benchmarks only)
  • Slurp: Time from first byte to complete stream consumption (stream benchmarks only)
  • Wall Time: Total testbench time (trigger workflow + poll for result)
  • Overhead: Testbench overhead (Wall Time - Workflow Time)
  • Samples: Number of benchmark iterations run
  • vs Fastest: How much slower compared to the fastest configuration for this benchmark

Worlds:

  • 💻 Local: In-memory filesystem world (local development)
  • 🐘 Postgres: PostgreSQL database world (local development)
  • ▲ Vercel: Vercel production/preview deployment
  • 🌐 Starter: Community world (local development)
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)

📋 View full workflow run

@TooTallNateGraphite App

TooTallNate commented Dec 18, 2025

Copy link
Copy Markdown
MemberAuthor

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enhances error debugging for server response validation in the Vercel world package by improving error messages and capturing response bodies when validation fails.

Key Changes:

  • Refactored makeRequest to use a Request object for better error reporting consistency
  • Enhanced error messages to include the full response body and detailed error information when schema validation fails
  • Removed unused ZodError import and simplified error handling logic

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

FileDescription
packages/world-vercel/src/utils.tsImproved error handling in the makeRequest function with better error messages and response body capture
.changeset/whole-lights-camp.mdAdds changeset entry for the patch release documenting the error debugging improvements

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment threadpackages/world-vercel/src/utils.ts
Comment threadpackages/world-vercel/src/utils.ts
);
}

const text = await response.text();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't this be in the try-catch?

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need text in the catch handler, so I think this is fine.

@TooTallNate
TooTallNate merged commit 6cd1a47 into mainDec 18, 2025
157 of 159 checks passed
@TooTallNate
TooTallNate deleted the 12-18-additional_error_debugging_when_failing_to_validate_server_response branch December 18, 2025 23:17
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@TooTallNate@adriandlam
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Additional error debugging when failing to validate server response - #647

Merged
TooTallNate merged 2 commits into
mainfrom
12-18-additional_error_debugging_when_failing_to_validate_server_response
Dec 18, 2025
Merged

Additional error debugging when failing to validate server response#647
TooTallNate merged 2 commits into
mainfrom
12-18-additional_error_debugging_when_failing_to_validate_server_response

Conversation

@TooTallNate

@TooTallNateTooTallNate commented Dec 18, 2025

Copy link
Copy Markdown
Member

Enhanced error debugging for server response validation in the Vercel world package.

What changed?

  • Improved error handling in the makeRequest function:
    • Created a separate Request object for better error reporting
    • Captured the response text before attempting to parse it
    • Enhanced error messages to include the response body when validation fails
    • Simplified error handling by removing the specific ZodError case

How to test?

  1. Make a request that returns an invalid response format
  2. Check the error message in the console, which should now include:
    • The HTTP method and endpoint
    • The detailed error message
    • The full response body for debugging

Why make this change?

This change makes it easier to debug issues when the server returns responses that don't match the expected schema. By including the full response body in the error message, developers can more quickly identify what's wrong with the response format without needing additional debugging steps.

@changeset-bot

changeset-botBot commented Dec 18, 2025

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 709e0e2

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 13 packages
NameType
@workflow/world-vercelPatch
@workflow/cliPatch
@workflow/corePatch
workflowPatch
@workflow/world-testingPatch
@workflow/buildersPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/web-sharedPatch
@workflow/aiPatch
@workflow/astroPatch
@workflow/sveltekitPatch
@workflow/nuxtPatch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel

vercelBot commented Dec 18, 2025

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Dec 18, 2025

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production286011297
✅ 💻 Local Development26208270
✅ 📦 Local Production26208270
✅ 🐘 Local Postgres26208270
✅ 🪟 Windows270027
❌ 🌍 Community Worlds109110120
Total120811351254

❌ Failed Tests

🌍 Community Worlds (11 failed)

mongodb (1 failed):

  • webhookWorkflow

redis (1 failed):

  • webhookWorkflow

starter (8 failed):

  • addTenWorkflow
  • addTenWorkflow
  • retryAttemptCounterWorkflow
  • crossFileErrorWorkflow - stack traces work across imported modules
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step

turso (1 failed):

  • webhookWorkflow

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro2601
✅ example2601
✅ express2601
✅ fastify2601
✅ hono2601
✅ nextjs-turbopack2601
✅ nextjs-webpack2601
✅ nitro2601
✅ nuxt2601
✅ sveltekit2601
✅ vite2601
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable2601
✅ express-stable2601
✅ fastify-stable2601
✅ hono-stable2601
✅ nextjs-turbopack-stable2700
✅ nextjs-webpack-stable2700
✅ nitro-stable2601
✅ nuxt-stable2601
✅ sveltekit-stable2601
✅ vite-stable2601
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable2601
✅ express-stable2601
✅ fastify-stable2601
✅ hono-stable2601
✅ nextjs-turbopack-stable2700
✅ nextjs-webpack-stable2700
✅ nitro-stable2601
✅ nuxt-stable2601
✅ sveltekit-stable2601
✅ vite-stable2601
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable2601
✅ express-stable2601
✅ fastify-stable2601
✅ hono-stable2601
✅ nextjs-turbopack-stable2700
✅ nextjs-webpack-stable2700
✅ nitro-stable2601
✅ nuxt-stable2601
✅ sveltekit-stable2601
✅ vite-stable2601
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack2700
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
❌ mongodb2610
✅ redis-dev300
❌ redis2610
✅ starter-dev300
❌ starter1980
✅ turso-dev300
❌ turso2610

📋 View full workflow run

@github-actions

github-actionsBot commented Dec 18, 2025

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

📈 Comparing against baseline from main branch. Green 🟢 = faster, Red 🔺 = slower.

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)0.037s (-4.8%)1.014s (~)0.976s101.00x
💻 LocalNext.js (Turbopack)0.040s (-2.0%)1.017s (~)0.977s101.07x
💻 LocalNitro0.043s (+1.2%)1.007s (~)0.964s101.14x
💻 LocalExpress0.043s (~)1.007s (~)0.964s101.16x
🌐 RedisNext.js (Turbopack)0.043s (+4.1%)1.018s (~)0.974s101.16x
🌐 MongoDBNext.js (Turbopack)0.052s (-32.9% 🟢)1.014s (~)0.962s101.40x
🌐 TursoNext.js (Turbopack)0.108s (+3.5%)1.014s (~)0.906s102.88x
🐘 PostgresNext.js (Turbopack)0.190s (+68.7% 🔺)1.021s (~)0.831s105.07x
🐘 PostgresNitro0.191s (-42.4% 🟢)1.029s (~)0.838s105.10x
🐘 PostgresExpress0.347s (+3.3%)1.012s (~)0.665s109.29x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)0.539s (-38.4% 🟢)1.452s (-20.0% 🟢)0.912s101.00x
▲ VercelNitro0.575s (+15.3% 🔺)1.448s (+4.7%)0.873s101.07x
▲ VercelExpress0.596s (-9.7% 🟢)1.606s (-21.0% 🟢)1.010s101.10x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)1.080s (-1.1%)2.012s (~)0.932s101.00x
💻 LocalNext.js (Turbopack)1.097s (~)2.012s (~)0.914s101.02x
🌐 RedisNext.js (Turbopack)1.100s (~)2.014s (~)0.914s101.02x
💻 LocalExpress1.112s (~)2.007s (~)0.895s101.03x
💻 LocalNitro1.116s (+0.5%)2.006s (~)0.890s101.03x
🌐 MongoDBNext.js (Turbopack)1.288s (-1.5%)2.012s (~)0.724s101.19x
🌐 TursoNext.js (Turbopack)1.310s (+0.9%)2.012s (~)0.702s101.21x
🐘 PostgresNext.js (Turbopack)2.042s (-16.3% 🟢)2.317s (-23.2% 🟢)0.275s101.89x
🐘 PostgresExpress2.196s (~)3.015s (~)0.818s102.03x
🐘 PostgresNitro2.438s (-0.6%)3.015s (~)0.577s102.26x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.581s (-0.6%)3.587s (+2.0%)1.006s101.00x
▲ VercelNitro2.659s (-2.3%)3.528s (~)0.869s101.03x
▲ VercelExpress2.677s (+1.2%)3.663s (+0.9%)0.986s101.04x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)10.603s (~)11.012s (~)0.409s51.00x
💻 LocalNext.js (Turbopack)10.643s (~)11.018s (~)0.375s51.00x
🌐 RedisNext.js (Turbopack)10.695s (~)11.018s (~)0.323s51.01x
💻 LocalExpress10.787s (~)11.013s (~)0.226s51.02x
💻 LocalNitro10.788s (~)11.012s (~)0.223s51.02x
🌐 MongoDBNext.js (Turbopack)12.208s (-0.8%)13.023s (~)0.815s51.15x
🌐 TursoNext.js (Turbopack)12.222s (~)13.027s (~)0.805s51.15x
🐘 PostgresNext.js (Turbopack)15.242s (-24.8% 🟢)16.031s (-23.8% 🟢)0.788s51.44x
🐘 PostgresNitro20.305s (~)21.040s (~)0.735s51.92x
🐘 PostgresExpress20.356s (~)21.032s (~)0.676s51.92x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro21.551s (~)22.449s (+0.6%)0.898s51.00x
▲ VercelNext.js (Turbopack)21.645s (-5.2% 🟢)22.170s (-6.3% 🟢)0.524s51.00x
▲ VercelExpress22.750s (+5.0%)23.636s (+5.4% 🔺)0.886s51.06x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)1.350s (~)2.008s (~)0.658s151.00x
🌐 RedisNext.js (Turbopack)1.383s (+2.0%)2.011s (~)0.628s151.02x
💻 LocalNitro1.400s (~)2.005s (~)0.605s151.04x
💻 LocalNext.js (Turbopack)1.401s (+1.7%)2.011s (~)0.610s151.04x
💻 LocalExpress1.412s (-0.5%)2.006s (~)0.594s151.05x
🐘 PostgresNext.js (Turbopack)1.987s (-21.8% 🟢)2.405s (-20.2% 🟢)0.418s131.47x
🌐 MongoDBNext.js (Turbopack)2.114s (-2.0%)3.016s (~)0.902s101.57x
🌐 TursoNext.js (Turbopack)2.228s (+2.0%)3.013s (~)0.785s101.65x
🐘 PostgresExpress2.456s (-1.5%)3.012s (~)0.556s101.82x
🐘 PostgresNitro2.670s (+0.8%)3.014s (~)0.345s101.98x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.290s (+16.9% 🔺)4.317s (+14.7% 🔺)1.028s81.00x
▲ VercelNext.js (Turbopack)9.668s (+241.1% 🔺)10.469s (+185.6% 🔺)0.801s32.94x
▲ VercelNitro10.037s (+261.6% 🔺)10.683s (+190.8% 🔺)0.646s33.05x

🔍 Observability: Express | Next.js (Turbopack) | Nitro

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.151s (+2.9%)3.035s (+3.0%)0.884s101.00x
💻 LocalNitro2.177s (-1.1%)3.148s (~)0.971s101.01x
💻 LocalExpress2.235s (-1.0%)3.184s (-0.5%)0.949s101.04x
🌐 StarterNext.js (Turbopack)2.447s (~)3.009s (~)0.562s101.14x
🌐 RedisNext.js (Turbopack)2.510s (+0.8%)3.019s (~)0.509s101.17x
🐘 PostgresNext.js (Turbopack)2.637s (-3.2%)3.021s (~)0.384s101.23x
🐘 PostgresExpress2.859s (-2.5%)3.012s (-3.2%)0.153s101.33x
🐘 PostgresNitro2.961s (-1.8%)3.113s (-13.0% 🟢)0.151s101.38x
🌐 TursoNext.js (Turbopack)4.729s (+1.3%)5.185s (~)0.456s62.20x
🌐 MongoDBNext.js (Turbopack)4.782s (+2.8%)5.185s (~)0.403s62.22x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.984s (-23.1% 🟢)3.770s (-21.4% 🟢)0.786s81.00x
▲ VercelNitro4.269s (+10.2% 🔺)5.033s (+13.4% 🔺)0.764s61.43x
▲ VercelNext.js (Turbopack)4.826s (+37.7% 🔺)5.397s (+32.4% 🔺)0.570s61.62x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)1.354s (-1.5%)2.007s (~)0.653s151.00x
🌐 RedisNext.js (Turbopack)1.393s (+1.2%)2.012s (~)0.618s151.03x
💻 LocalNext.js (Turbopack)1.408s (+1.5%)2.013s (~)0.606s151.04x
💻 LocalNitro1.409s (+0.5%)2.005s (~)0.596s151.04x
💻 LocalExpress1.431s (~)2.006s (~)0.576s151.06x
🐘 PostgresExpress1.686s (-20.9% 🟢)2.011s (-31.3% 🟢)0.325s151.25x
🐘 PostgresNext.js (Turbopack)1.722s (+4.5%)2.012s (~)0.290s151.27x
🐘 PostgresNitro1.988s (+6.9% 🔺)2.597s (+29.3% 🔺)0.609s121.47x
🌐 MongoDBNext.js (Turbopack)2.144s (+0.8%)3.012s (~)0.867s101.58x
🌐 TursoNext.js (Turbopack)2.225s (~)3.013s (~)0.788s101.64x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.650s (-1.3%)3.679s (~)1.029s91.00x
▲ VercelNitro2.653s (+1.0%)3.649s (+1.1%)0.996s91.00x
▲ VercelNext.js (Turbopack)2.849s (+7.5% 🔺)3.685s (+2.3%)0.836s91.08x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.125s (+3.9%)3.008s (+4.4%)0.883s111.00x
💻 LocalNitro2.237s (+1.9%)3.201s (+2.1%)0.964s101.05x
💻 LocalExpress2.279s (-1.4%)3.205s (-1.5%)0.926s101.07x
🌐 StarterNext.js (Turbopack)2.464s (~)3.011s (~)0.547s101.16x
🌐 RedisNext.js (Turbopack)2.538s (+1.8%)3.024s (~)0.487s101.19x
🐘 PostgresNext.js (Turbopack)2.661s (+6.2% 🔺)3.020s (~)0.359s101.25x
🐘 PostgresExpress2.739s (-7.1% 🟢)3.016s (-6.4% 🟢)0.277s101.29x
🐘 PostgresNitro2.878s (+10.9% 🔺)3.466s (+14.6% 🔺)0.588s91.35x
🌐 TursoNext.js (Turbopack)4.787s (+2.7%)5.185s (~)0.398s62.25x
🌐 MongoDBNext.js (Turbopack)4.812s (+1.3%)5.179s (~)0.367s62.26x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.186s (-1.3%)3.857s (-1.4%)0.671s81.00x
▲ VercelNitro3.309s (-7.3% 🟢)3.880s (-6.2% 🟢)0.571s81.04x
▲ VercelNext.js (Turbopack)3.477s (+7.2% 🔺)4.009s (+6.9% 🔺)0.532s81.09x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)0.136s (+9.3% 🔺)1.006s (~)0.000s (NaN%)1.012s (~)0.877s101.00x
💻 LocalNext.js (Turbopack)0.142s (+1.4%)1.003s (~)0.019s (+24.5% 🔺)1.031s (~)0.889s101.04x
🌐 RedisNext.js (Turbopack)0.157s (~)1.005s (~)0.000s (+Infinity% 🔺)1.014s (~)0.857s101.16x
💻 LocalNitro0.177s (+1.5%)0.992s (~)0.016s (+12.7% 🔺)1.022s (~)0.845s101.30x
💻 LocalExpress0.177s (~)0.992s (~)0.017s (+3.7%)1.024s (~)0.847s101.31x
🌐 TursoNext.js (Turbopack)0.503s (+10.5% 🔺)0.948s (-4.8%)0.000s (NaN%)1.013s (~)0.510s103.71x
🌐 MongoDBNext.js (Turbopack)0.513s (+3.5%)0.935s (-2.1%)0.000s (-50.0% 🟢)1.013s (~)0.500s103.78x
🐘 PostgresNext.js (Turbopack)1.121s (-50.8% 🟢)1.929s (-30.4% 🟢)0.000s (~)2.019s (-33.1% 🟢)0.898s108.26x
🐘 PostgresNitro2.225s (+2.2%)2.821s (-1.5%)0.000s (+Infinity% 🔺)3.016s (~)0.791s1016.40x
🐘 PostgresExpress2.382s (~)2.661s (~)0.000s (-100.0% 🟢)3.014s (~)0.632s1017.55x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.637s (-0.8%)3.199s (+5.1% 🔺)0.244s (-51.5% 🟢)3.838s (-3.7%)1.201s101.00x
▲ VercelNitro2.728s (+7.0% 🔺)3.094s (+0.9%)0.890s (+162.3% 🔺)4.450s (+17.8% 🔺)1.722s101.03x
▲ VercelExpress6.451s (+150.9% 🔺)5.995s (+92.2% 🔺)0.418s (+6.1% 🔺)7.840s (+99.4% 🔺)1.389s102.45x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)7/8
🐘 PostgresNext.js (Turbopack)7/8
▲ VercelExpress4/8
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local8/8
Next.js (Turbopack)🌐 Starter6/8
Nitro💻 Local8/8
Column Definitions
  • Workflow Time: Runtime reported by workflow (completedAt - createdAt) - primary metric
  • TTFB: Time to First Byte - time from workflow start until first stream byte received (stream benchmarks only)
  • Slurp: Time from first byte to complete stream consumption (stream benchmarks only)
  • Wall Time: Total testbench time (trigger workflow + poll for result)
  • Overhead: Testbench overhead (Wall Time - Workflow Time)
  • Samples: Number of benchmark iterations run
  • vs Fastest: How much slower compared to the fastest configuration for this benchmark

Worlds:

  • 💻 Local: In-memory filesystem world (local development)
  • 🐘 Postgres: PostgreSQL database world (local development)
  • ▲ Vercel: Vercel production/preview deployment
  • 🌐 Starter: Community world (local development)
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)

📋 View full workflow run

@TooTallNateGraphite App

TooTallNate commented Dec 18, 2025

Copy link
Copy Markdown
MemberAuthor

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enhances error debugging for server response validation in the Vercel world package by improving error messages and capturing response bodies when validation fails.

Key Changes:

  • Refactored makeRequest to use a Request object for better error reporting consistency
  • Enhanced error messages to include the full response body and detailed error information when schema validation fails
  • Removed unused ZodError import and simplified error handling logic

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

FileDescription
packages/world-vercel/src/utils.tsImproved error handling in the makeRequest function with better error messages and response body capture
.changeset/whole-lights-camp.mdAdds changeset entry for the patch release documenting the error debugging improvements

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment threadpackages/world-vercel/src/utils.ts
Comment threadpackages/world-vercel/src/utils.ts
);
}

const text = await response.text();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't this be in the try-catch?

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need text in the catch handler, so I think this is fine.

@TooTallNate
TooTallNate merged commit 6cd1a47 into mainDec 18, 2025
157 of 159 checks passed
@TooTallNate
TooTallNate deleted the 12-18-additional_error_debugging_when_failing_to_validate_server_response branch December 18, 2025 23:17
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@TooTallNate@adriandlam
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Additional error debugging when failing to validate server response - #647

Merged
TooTallNate merged 2 commits into
mainfrom
12-18-additional_error_debugging_when_failing_to_validate_server_response
Dec 18, 2025
Merged

Additional error debugging when failing to validate server response#647
TooTallNate merged 2 commits into
mainfrom
12-18-additional_error_debugging_when_failing_to_validate_server_response

Conversation

@TooTallNate

@TooTallNateTooTallNate commented Dec 18, 2025

Copy link
Copy Markdown
Member

Enhanced error debugging for server response validation in the Vercel world package.

What changed?

  • Improved error handling in the makeRequest function:
    • Created a separate Request object for better error reporting
    • Captured the response text before attempting to parse it
    • Enhanced error messages to include the response body when validation fails
    • Simplified error handling by removing the specific ZodError case

How to test?

  1. Make a request that returns an invalid response format
  2. Check the error message in the console, which should now include:
    • The HTTP method and endpoint
    • The detailed error message
    • The full response body for debugging

Why make this change?

This change makes it easier to debug issues when the server returns responses that don't match the expected schema. By including the full response body in the error message, developers can more quickly identify what's wrong with the response format without needing additional debugging steps.

@changeset-bot

changeset-botBot commented Dec 18, 2025

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 709e0e2

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 13 packages
NameType
@workflow/world-vercelPatch
@workflow/cliPatch
@workflow/corePatch
workflowPatch
@workflow/world-testingPatch
@workflow/buildersPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/web-sharedPatch
@workflow/aiPatch
@workflow/astroPatch
@workflow/sveltekitPatch
@workflow/nuxtPatch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel

vercelBot commented Dec 18, 2025

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Dec 18, 2025

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production286011297
✅ 💻 Local Development26208270
✅ 📦 Local Production26208270
✅ 🐘 Local Postgres26208270
✅ 🪟 Windows270027
❌ 🌍 Community Worlds109110120
Total120811351254

❌ Failed Tests

🌍 Community Worlds (11 failed)

mongodb (1 failed):

  • webhookWorkflow

redis (1 failed):

  • webhookWorkflow

starter (8 failed):

  • addTenWorkflow
  • addTenWorkflow
  • retryAttemptCounterWorkflow
  • crossFileErrorWorkflow - stack traces work across imported modules
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step

turso (1 failed):

  • webhookWorkflow

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro2601
✅ example2601
✅ express2601
✅ fastify2601
✅ hono2601
✅ nextjs-turbopack2601
✅ nextjs-webpack2601
✅ nitro2601
✅ nuxt2601
✅ sveltekit2601
✅ vite2601
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable2601
✅ express-stable2601
✅ fastify-stable2601
✅ hono-stable2601
✅ nextjs-turbopack-stable2700
✅ nextjs-webpack-stable2700
✅ nitro-stable2601
✅ nuxt-stable2601
✅ sveltekit-stable2601
✅ vite-stable2601
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable2601
✅ express-stable2601
✅ fastify-stable2601
✅ hono-stable2601
✅ nextjs-turbopack-stable2700
✅ nextjs-webpack-stable2700
✅ nitro-stable2601
✅ nuxt-stable2601
✅ sveltekit-stable2601
✅ vite-stable2601
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable2601
✅ express-stable2601
✅ fastify-stable2601
✅ hono-stable2601
✅ nextjs-turbopack-stable2700
✅ nextjs-webpack-stable2700
✅ nitro-stable2601
✅ nuxt-stable2601
✅ sveltekit-stable2601
✅ vite-stable2601
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack2700
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
❌ mongodb2610
✅ redis-dev300
❌ redis2610
✅ starter-dev300
❌ starter1980
✅ turso-dev300
❌ turso2610

📋 View full workflow run

@github-actions

github-actionsBot commented Dec 18, 2025

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

📈 Comparing against baseline from main branch. Green 🟢 = faster, Red 🔺 = slower.

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)0.037s (-4.8%)1.014s (~)0.976s101.00x
💻 LocalNext.js (Turbopack)0.040s (-2.0%)1.017s (~)0.977s101.07x
💻 LocalNitro0.043s (+1.2%)1.007s (~)0.964s101.14x
💻 LocalExpress0.043s (~)1.007s (~)0.964s101.16x
🌐 RedisNext.js (Turbopack)0.043s (+4.1%)1.018s (~)0.974s101.16x
🌐 MongoDBNext.js (Turbopack)0.052s (-32.9% 🟢)1.014s (~)0.962s101.40x
🌐 TursoNext.js (Turbopack)0.108s (+3.5%)1.014s (~)0.906s102.88x
🐘 PostgresNext.js (Turbopack)0.190s (+68.7% 🔺)1.021s (~)0.831s105.07x
🐘 PostgresNitro0.191s (-42.4% 🟢)1.029s (~)0.838s105.10x
🐘 PostgresExpress0.347s (+3.3%)1.012s (~)0.665s109.29x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)0.539s (-38.4% 🟢)1.452s (-20.0% 🟢)0.912s101.00x
▲ VercelNitro0.575s (+15.3% 🔺)1.448s (+4.7%)0.873s101.07x
▲ VercelExpress0.596s (-9.7% 🟢)1.606s (-21.0% 🟢)1.010s101.10x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)1.080s (-1.1%)2.012s (~)0.932s101.00x
💻 LocalNext.js (Turbopack)1.097s (~)2.012s (~)0.914s101.02x
🌐 RedisNext.js (Turbopack)1.100s (~)2.014s (~)0.914s101.02x
💻 LocalExpress1.112s (~)2.007s (~)0.895s101.03x
💻 LocalNitro1.116s (+0.5%)2.006s (~)0.890s101.03x
🌐 MongoDBNext.js (Turbopack)1.288s (-1.5%)2.012s (~)0.724s101.19x
🌐 TursoNext.js (Turbopack)1.310s (+0.9%)2.012s (~)0.702s101.21x
🐘 PostgresNext.js (Turbopack)2.042s (-16.3% 🟢)2.317s (-23.2% 🟢)0.275s101.89x
🐘 PostgresExpress2.196s (~)3.015s (~)0.818s102.03x
🐘 PostgresNitro2.438s (-0.6%)3.015s (~)0.577s102.26x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.581s (-0.6%)3.587s (+2.0%)1.006s101.00x
▲ VercelNitro2.659s (-2.3%)3.528s (~)0.869s101.03x
▲ VercelExpress2.677s (+1.2%)3.663s (+0.9%)0.986s101.04x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)10.603s (~)11.012s (~)0.409s51.00x
💻 LocalNext.js (Turbopack)10.643s (~)11.018s (~)0.375s51.00x
🌐 RedisNext.js (Turbopack)10.695s (~)11.018s (~)0.323s51.01x
💻 LocalExpress10.787s (~)11.013s (~)0.226s51.02x
💻 LocalNitro10.788s (~)11.012s (~)0.223s51.02x
🌐 MongoDBNext.js (Turbopack)12.208s (-0.8%)13.023s (~)0.815s51.15x
🌐 TursoNext.js (Turbopack)12.222s (~)13.027s (~)0.805s51.15x
🐘 PostgresNext.js (Turbopack)15.242s (-24.8% 🟢)16.031s (-23.8% 🟢)0.788s51.44x
🐘 PostgresNitro20.305s (~)21.040s (~)0.735s51.92x
🐘 PostgresExpress20.356s (~)21.032s (~)0.676s51.92x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro21.551s (~)22.449s (+0.6%)0.898s51.00x
▲ VercelNext.js (Turbopack)21.645s (-5.2% 🟢)22.170s (-6.3% 🟢)0.524s51.00x
▲ VercelExpress22.750s (+5.0%)23.636s (+5.4% 🔺)0.886s51.06x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)1.350s (~)2.008s (~)0.658s151.00x
🌐 RedisNext.js (Turbopack)1.383s (+2.0%)2.011s (~)0.628s151.02x
💻 LocalNitro1.400s (~)2.005s (~)0.605s151.04x
💻 LocalNext.js (Turbopack)1.401s (+1.7%)2.011s (~)0.610s151.04x
💻 LocalExpress1.412s (-0.5%)2.006s (~)0.594s151.05x
🐘 PostgresNext.js (Turbopack)1.987s (-21.8% 🟢)2.405s (-20.2% 🟢)0.418s131.47x
🌐 MongoDBNext.js (Turbopack)2.114s (-2.0%)3.016s (~)0.902s101.57x
🌐 TursoNext.js (Turbopack)2.228s (+2.0%)3.013s (~)0.785s101.65x
🐘 PostgresExpress2.456s (-1.5%)3.012s (~)0.556s101.82x
🐘 PostgresNitro2.670s (+0.8%)3.014s (~)0.345s101.98x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.290s (+16.9% 🔺)4.317s (+14.7% 🔺)1.028s81.00x
▲ VercelNext.js (Turbopack)9.668s (+241.1% 🔺)10.469s (+185.6% 🔺)0.801s32.94x
▲ VercelNitro10.037s (+261.6% 🔺)10.683s (+190.8% 🔺)0.646s33.05x

🔍 Observability: Express | Next.js (Turbopack) | Nitro

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.151s (+2.9%)3.035s (+3.0%)0.884s101.00x
💻 LocalNitro2.177s (-1.1%)3.148s (~)0.971s101.01x
💻 LocalExpress2.235s (-1.0%)3.184s (-0.5%)0.949s101.04x
🌐 StarterNext.js (Turbopack)2.447s (~)3.009s (~)0.562s101.14x
🌐 RedisNext.js (Turbopack)2.510s (+0.8%)3.019s (~)0.509s101.17x
🐘 PostgresNext.js (Turbopack)2.637s (-3.2%)3.021s (~)0.384s101.23x
🐘 PostgresExpress2.859s (-2.5%)3.012s (-3.2%)0.153s101.33x
🐘 PostgresNitro2.961s (-1.8%)3.113s (-13.0% 🟢)0.151s101.38x
🌐 TursoNext.js (Turbopack)4.729s (+1.3%)5.185s (~)0.456s62.20x
🌐 MongoDBNext.js (Turbopack)4.782s (+2.8%)5.185s (~)0.403s62.22x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.984s (-23.1% 🟢)3.770s (-21.4% 🟢)0.786s81.00x
▲ VercelNitro4.269s (+10.2% 🔺)5.033s (+13.4% 🔺)0.764s61.43x
▲ VercelNext.js (Turbopack)4.826s (+37.7% 🔺)5.397s (+32.4% 🔺)0.570s61.62x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)1.354s (-1.5%)2.007s (~)0.653s151.00x
🌐 RedisNext.js (Turbopack)1.393s (+1.2%)2.012s (~)0.618s151.03x
💻 LocalNext.js (Turbopack)1.408s (+1.5%)2.013s (~)0.606s151.04x
💻 LocalNitro1.409s (+0.5%)2.005s (~)0.596s151.04x
💻 LocalExpress1.431s (~)2.006s (~)0.576s151.06x
🐘 PostgresExpress1.686s (-20.9% 🟢)2.011s (-31.3% 🟢)0.325s151.25x
🐘 PostgresNext.js (Turbopack)1.722s (+4.5%)2.012s (~)0.290s151.27x
🐘 PostgresNitro1.988s (+6.9% 🔺)2.597s (+29.3% 🔺)0.609s121.47x
🌐 MongoDBNext.js (Turbopack)2.144s (+0.8%)3.012s (~)0.867s101.58x
🌐 TursoNext.js (Turbopack)2.225s (~)3.013s (~)0.788s101.64x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.650s (-1.3%)3.679s (~)1.029s91.00x
▲ VercelNitro2.653s (+1.0%)3.649s (+1.1%)0.996s91.00x
▲ VercelNext.js (Turbopack)2.849s (+7.5% 🔺)3.685s (+2.3%)0.836s91.08x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.125s (+3.9%)3.008s (+4.4%)0.883s111.00x
💻 LocalNitro2.237s (+1.9%)3.201s (+2.1%)0.964s101.05x
💻 LocalExpress2.279s (-1.4%)3.205s (-1.5%)0.926s101.07x
🌐 StarterNext.js (Turbopack)2.464s (~)3.011s (~)0.547s101.16x
🌐 RedisNext.js (Turbopack)2.538s (+1.8%)3.024s (~)0.487s101.19x
🐘 PostgresNext.js (Turbopack)2.661s (+6.2% 🔺)3.020s (~)0.359s101.25x
🐘 PostgresExpress2.739s (-7.1% 🟢)3.016s (-6.4% 🟢)0.277s101.29x
🐘 PostgresNitro2.878s (+10.9% 🔺)3.466s (+14.6% 🔺)0.588s91.35x
🌐 TursoNext.js (Turbopack)4.787s (+2.7%)5.185s (~)0.398s62.25x
🌐 MongoDBNext.js (Turbopack)4.812s (+1.3%)5.179s (~)0.367s62.26x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.186s (-1.3%)3.857s (-1.4%)0.671s81.00x
▲ VercelNitro3.309s (-7.3% 🟢)3.880s (-6.2% 🟢)0.571s81.04x
▲ VercelNext.js (Turbopack)3.477s (+7.2% 🔺)4.009s (+6.9% 🔺)0.532s81.09x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)0.136s (+9.3% 🔺)1.006s (~)0.000s (NaN%)1.012s (~)0.877s101.00x
💻 LocalNext.js (Turbopack)0.142s (+1.4%)1.003s (~)0.019s (+24.5% 🔺)1.031s (~)0.889s101.04x
🌐 RedisNext.js (Turbopack)0.157s (~)1.005s (~)0.000s (+Infinity% 🔺)1.014s (~)0.857s101.16x
💻 LocalNitro0.177s (+1.5%)0.992s (~)0.016s (+12.7% 🔺)1.022s (~)0.845s101.30x
💻 LocalExpress0.177s (~)0.992s (~)0.017s (+3.7%)1.024s (~)0.847s101.31x
🌐 TursoNext.js (Turbopack)0.503s (+10.5% 🔺)0.948s (-4.8%)0.000s (NaN%)1.013s (~)0.510s103.71x
🌐 MongoDBNext.js (Turbopack)0.513s (+3.5%)0.935s (-2.1%)0.000s (-50.0% 🟢)1.013s (~)0.500s103.78x
🐘 PostgresNext.js (Turbopack)1.121s (-50.8% 🟢)1.929s (-30.4% 🟢)0.000s (~)2.019s (-33.1% 🟢)0.898s108.26x
🐘 PostgresNitro2.225s (+2.2%)2.821s (-1.5%)0.000s (+Infinity% 🔺)3.016s (~)0.791s1016.40x
🐘 PostgresExpress2.382s (~)2.661s (~)0.000s (-100.0% 🟢)3.014s (~)0.632s1017.55x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.637s (-0.8%)3.199s (+5.1% 🔺)0.244s (-51.5% 🟢)3.838s (-3.7%)1.201s101.00x
▲ VercelNitro2.728s (+7.0% 🔺)3.094s (+0.9%)0.890s (+162.3% 🔺)4.450s (+17.8% 🔺)1.722s101.03x
▲ VercelExpress6.451s (+150.9% 🔺)5.995s (+92.2% 🔺)0.418s (+6.1% 🔺)7.840s (+99.4% 🔺)1.389s102.45x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)7/8
🐘 PostgresNext.js (Turbopack)7/8
▲ VercelExpress4/8
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local8/8
Next.js (Turbopack)🌐 Starter6/8
Nitro💻 Local8/8
Column Definitions
  • Workflow Time: Runtime reported by workflow (completedAt - createdAt) - primary metric
  • TTFB: Time to First Byte - time from workflow start until first stream byte received (stream benchmarks only)
  • Slurp: Time from first byte to complete stream consumption (stream benchmarks only)
  • Wall Time: Total testbench time (trigger workflow + poll for result)
  • Overhead: Testbench overhead (Wall Time - Workflow Time)
  • Samples: Number of benchmark iterations run
  • vs Fastest: How much slower compared to the fastest configuration for this benchmark

Worlds:

  • 💻 Local: In-memory filesystem world (local development)
  • 🐘 Postgres: PostgreSQL database world (local development)
  • ▲ Vercel: Vercel production/preview deployment
  • 🌐 Starter: Community world (local development)
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)

📋 View full workflow run

@TooTallNateGraphite App

TooTallNate commented Dec 18, 2025

Copy link
Copy Markdown
MemberAuthor

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enhances error debugging for server response validation in the Vercel world package by improving error messages and capturing response bodies when validation fails.

Key Changes:

  • Refactored makeRequest to use a Request object for better error reporting consistency
  • Enhanced error messages to include the full response body and detailed error information when schema validation fails
  • Removed unused ZodError import and simplified error handling logic

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

FileDescription
packages/world-vercel/src/utils.tsImproved error handling in the makeRequest function with better error messages and response body capture
.changeset/whole-lights-camp.mdAdds changeset entry for the patch release documenting the error debugging improvements

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment threadpackages/world-vercel/src/utils.ts
Comment threadpackages/world-vercel/src/utils.ts
);
}

const text = await response.text();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't this be in the try-catch?

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need text in the catch handler, so I think this is fine.

@TooTallNate
TooTallNate merged commit 6cd1a47 into mainDec 18, 2025
157 of 159 checks passed
@TooTallNate
TooTallNate deleted the 12-18-additional_error_debugging_when_failing_to_validate_server_response branch December 18, 2025 23:17
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@TooTallNate@adriandlam
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content

Additional error debugging when failing to validate server response - #647

Merged
TooTallNate merged 2 commits into
mainfrom
12-18-additional_error_debugging_when_failing_to_validate_server_response
Dec 18, 2025
Merged

Additional error debugging when failing to validate server response#647
TooTallNate merged 2 commits into
mainfrom
12-18-additional_error_debugging_when_failing_to_validate_server_response

Conversation

@TooTallNate

@TooTallNateTooTallNate commented Dec 18, 2025

Copy link
Copy Markdown
Member

Enhanced error debugging for server response validation in the Vercel world package.

What changed?

  • Improved error handling in the makeRequest function:
    • Created a separate Request object for better error reporting
    • Captured the response text before attempting to parse it
    • Enhanced error messages to include the response body when validation fails
    • Simplified error handling by removing the specific ZodError case

How to test?

  1. Make a request that returns an invalid response format
  2. Check the error message in the console, which should now include:
    • The HTTP method and endpoint
    • The detailed error message
    • The full response body for debugging

Why make this change?

This change makes it easier to debug issues when the server returns responses that don't match the expected schema. By including the full response body in the error message, developers can more quickly identify what's wrong with the response format without needing additional debugging steps.

@changeset-bot

changeset-botBot commented Dec 18, 2025

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 709e0e2

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 13 packages
NameType
@workflow/world-vercelPatch
@workflow/cliPatch
@workflow/corePatch
workflowPatch
@workflow/world-testingPatch
@workflow/buildersPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/web-sharedPatch
@workflow/aiPatch
@workflow/astroPatch
@workflow/sveltekitPatch
@workflow/nuxtPatch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel

vercelBot commented Dec 18, 2025

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Dec 18, 2025

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production286011297
✅ 💻 Local Development26208270
✅ 📦 Local Production26208270
✅ 🐘 Local Postgres26208270
✅ 🪟 Windows270027
❌ 🌍 Community Worlds109110120
Total120811351254

❌ Failed Tests

🌍 Community Worlds (11 failed)

mongodb (1 failed):

  • webhookWorkflow

redis (1 failed):

  • webhookWorkflow

starter (8 failed):

  • addTenWorkflow
  • addTenWorkflow
  • retryAttemptCounterWorkflow
  • crossFileErrorWorkflow - stack traces work across imported modules
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step

turso (1 failed):

  • webhookWorkflow

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro2601
✅ example2601
✅ express2601
✅ fastify2601
✅ hono2601
✅ nextjs-turbopack2601
✅ nextjs-webpack2601
✅ nitro2601
✅ nuxt2601
✅ sveltekit2601
✅ vite2601
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable2601
✅ express-stable2601
✅ fastify-stable2601
✅ hono-stable2601
✅ nextjs-turbopack-stable2700
✅ nextjs-webpack-stable2700
✅ nitro-stable2601
✅ nuxt-stable2601
✅ sveltekit-stable2601
✅ vite-stable2601
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable2601
✅ express-stable2601
✅ fastify-stable2601
✅ hono-stable2601
✅ nextjs-turbopack-stable2700
✅ nextjs-webpack-stable2700
✅ nitro-stable2601
✅ nuxt-stable2601
✅ sveltekit-stable2601
✅ vite-stable2601
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable2601
✅ express-stable2601
✅ fastify-stable2601
✅ hono-stable2601
✅ nextjs-turbopack-stable2700
✅ nextjs-webpack-stable2700
✅ nitro-stable2601
✅ nuxt-stable2601
✅ sveltekit-stable2601
✅ vite-stable2601
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack2700
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
❌ mongodb2610
✅ redis-dev300
❌ redis2610
✅ starter-dev300
❌ starter1980
✅ turso-dev300
❌ turso2610

📋 View full workflow run

@github-actions

github-actionsBot commented Dec 18, 2025

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

📈 Comparing against baseline from main branch. Green 🟢 = faster, Red 🔺 = slower.

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)0.037s (-4.8%)1.014s (~)0.976s101.00x
💻 LocalNext.js (Turbopack)0.040s (-2.0%)1.017s (~)0.977s101.07x
💻 LocalNitro0.043s (+1.2%)1.007s (~)0.964s101.14x
💻 LocalExpress0.043s (~)1.007s (~)0.964s101.16x
🌐 RedisNext.js (Turbopack)0.043s (+4.1%)1.018s (~)0.974s101.16x
🌐 MongoDBNext.js (Turbopack)0.052s (-32.9% 🟢)1.014s (~)0.962s101.40x
🌐 TursoNext.js (Turbopack)0.108s (+3.5%)1.014s (~)0.906s102.88x
🐘 PostgresNext.js (Turbopack)0.190s (+68.7% 🔺)1.021s (~)0.831s105.07x
🐘 PostgresNitro0.191s (-42.4% 🟢)1.029s (~)0.838s105.10x
🐘 PostgresExpress0.347s (+3.3%)1.012s (~)0.665s109.29x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)0.539s (-38.4% 🟢)1.452s (-20.0% 🟢)0.912s101.00x
▲ VercelNitro0.575s (+15.3% 🔺)1.448s (+4.7%)0.873s101.07x
▲ VercelExpress0.596s (-9.7% 🟢)1.606s (-21.0% 🟢)1.010s101.10x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)1.080s (-1.1%)2.012s (~)0.932s101.00x
💻 LocalNext.js (Turbopack)1.097s (~)2.012s (~)0.914s101.02x
🌐 RedisNext.js (Turbopack)1.100s (~)2.014s (~)0.914s101.02x
💻 LocalExpress1.112s (~)2.007s (~)0.895s101.03x
💻 LocalNitro1.116s (+0.5%)2.006s (~)0.890s101.03x
🌐 MongoDBNext.js (Turbopack)1.288s (-1.5%)2.012s (~)0.724s101.19x
🌐 TursoNext.js (Turbopack)1.310s (+0.9%)2.012s (~)0.702s101.21x
🐘 PostgresNext.js (Turbopack)2.042s (-16.3% 🟢)2.317s (-23.2% 🟢)0.275s101.89x
🐘 PostgresExpress2.196s (~)3.015s (~)0.818s102.03x
🐘 PostgresNitro2.438s (-0.6%)3.015s (~)0.577s102.26x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.581s (-0.6%)3.587s (+2.0%)1.006s101.00x
▲ VercelNitro2.659s (-2.3%)3.528s (~)0.869s101.03x
▲ VercelExpress2.677s (+1.2%)3.663s (+0.9%)0.986s101.04x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)10.603s (~)11.012s (~)0.409s51.00x
💻 LocalNext.js (Turbopack)10.643s (~)11.018s (~)0.375s51.00x
🌐 RedisNext.js (Turbopack)10.695s (~)11.018s (~)0.323s51.01x
💻 LocalExpress10.787s (~)11.013s (~)0.226s51.02x
💻 LocalNitro10.788s (~)11.012s (~)0.223s51.02x
🌐 MongoDBNext.js (Turbopack)12.208s (-0.8%)13.023s (~)0.815s51.15x
🌐 TursoNext.js (Turbopack)12.222s (~)13.027s (~)0.805s51.15x
🐘 PostgresNext.js (Turbopack)15.242s (-24.8% 🟢)16.031s (-23.8% 🟢)0.788s51.44x
🐘 PostgresNitro20.305s (~)21.040s (~)0.735s51.92x
🐘 PostgresExpress20.356s (~)21.032s (~)0.676s51.92x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro21.551s (~)22.449s (+0.6%)0.898s51.00x
▲ VercelNext.js (Turbopack)21.645s (-5.2% 🟢)22.170s (-6.3% 🟢)0.524s51.00x
▲ VercelExpress22.750s (+5.0%)23.636s (+5.4% 🔺)0.886s51.06x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)1.350s (~)2.008s (~)0.658s151.00x
🌐 RedisNext.js (Turbopack)1.383s (+2.0%)2.011s (~)0.628s151.02x
💻 LocalNitro1.400s (~)2.005s (~)0.605s151.04x
💻 LocalNext.js (Turbopack)1.401s (+1.7%)2.011s (~)0.610s151.04x
💻 LocalExpress1.412s (-0.5%)2.006s (~)0.594s151.05x
🐘 PostgresNext.js (Turbopack)1.987s (-21.8% 🟢)2.405s (-20.2% 🟢)0.418s131.47x
🌐 MongoDBNext.js (Turbopack)2.114s (-2.0%)3.016s (~)0.902s101.57x
🌐 TursoNext.js (Turbopack)2.228s (+2.0%)3.013s (~)0.785s101.65x
🐘 PostgresExpress2.456s (-1.5%)3.012s (~)0.556s101.82x
🐘 PostgresNitro2.670s (+0.8%)3.014s (~)0.345s101.98x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.290s (+16.9% 🔺)4.317s (+14.7% 🔺)1.028s81.00x
▲ VercelNext.js (Turbopack)9.668s (+241.1% 🔺)10.469s (+185.6% 🔺)0.801s32.94x
▲ VercelNitro10.037s (+261.6% 🔺)10.683s (+190.8% 🔺)0.646s33.05x

🔍 Observability: Express | Next.js (Turbopack) | Nitro

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.151s (+2.9%)3.035s (+3.0%)0.884s101.00x
💻 LocalNitro2.177s (-1.1%)3.148s (~)0.971s101.01x
💻 LocalExpress2.235s (-1.0%)3.184s (-0.5%)0.949s101.04x
🌐 StarterNext.js (Turbopack)2.447s (~)3.009s (~)0.562s101.14x
🌐 RedisNext.js (Turbopack)2.510s (+0.8%)3.019s (~)0.509s101.17x
🐘 PostgresNext.js (Turbopack)2.637s (-3.2%)3.021s (~)0.384s101.23x
🐘 PostgresExpress2.859s (-2.5%)3.012s (-3.2%)0.153s101.33x
🐘 PostgresNitro2.961s (-1.8%)3.113s (-13.0% 🟢)0.151s101.38x
🌐 TursoNext.js (Turbopack)4.729s (+1.3%)5.185s (~)0.456s62.20x
🌐 MongoDBNext.js (Turbopack)4.782s (+2.8%)5.185s (~)0.403s62.22x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.984s (-23.1% 🟢)3.770s (-21.4% 🟢)0.786s81.00x
▲ VercelNitro4.269s (+10.2% 🔺)5.033s (+13.4% 🔺)0.764s61.43x
▲ VercelNext.js (Turbopack)4.826s (+37.7% 🔺)5.397s (+32.4% 🔺)0.570s61.62x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)1.354s (-1.5%)2.007s (~)0.653s151.00x
🌐 RedisNext.js (Turbopack)1.393s (+1.2%)2.012s (~)0.618s151.03x
💻 LocalNext.js (Turbopack)1.408s (+1.5%)2.013s (~)0.606s151.04x
💻 LocalNitro1.409s (+0.5%)2.005s (~)0.596s151.04x
💻 LocalExpress1.431s (~)2.006s (~)0.576s151.06x
🐘 PostgresExpress1.686s (-20.9% 🟢)2.011s (-31.3% 🟢)0.325s151.25x
🐘 PostgresNext.js (Turbopack)1.722s (+4.5%)2.012s (~)0.290s151.27x
🐘 PostgresNitro1.988s (+6.9% 🔺)2.597s (+29.3% 🔺)0.609s121.47x
🌐 MongoDBNext.js (Turbopack)2.144s (+0.8%)3.012s (~)0.867s101.58x
🌐 TursoNext.js (Turbopack)2.225s (~)3.013s (~)0.788s101.64x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.650s (-1.3%)3.679s (~)1.029s91.00x
▲ VercelNitro2.653s (+1.0%)3.649s (+1.1%)0.996s91.00x
▲ VercelNext.js (Turbopack)2.849s (+7.5% 🔺)3.685s (+2.3%)0.836s91.08x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.125s (+3.9%)3.008s (+4.4%)0.883s111.00x
💻 LocalNitro2.237s (+1.9%)3.201s (+2.1%)0.964s101.05x
💻 LocalExpress2.279s (-1.4%)3.205s (-1.5%)0.926s101.07x
🌐 StarterNext.js (Turbopack)2.464s (~)3.011s (~)0.547s101.16x
🌐 RedisNext.js (Turbopack)2.538s (+1.8%)3.024s (~)0.487s101.19x
🐘 PostgresNext.js (Turbopack)2.661s (+6.2% 🔺)3.020s (~)0.359s101.25x
🐘 PostgresExpress2.739s (-7.1% 🟢)3.016s (-6.4% 🟢)0.277s101.29x
🐘 PostgresNitro2.878s (+10.9% 🔺)3.466s (+14.6% 🔺)0.588s91.35x
🌐 TursoNext.js (Turbopack)4.787s (+2.7%)5.185s (~)0.398s62.25x
🌐 MongoDBNext.js (Turbopack)4.812s (+1.3%)5.179s (~)0.367s62.26x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.186s (-1.3%)3.857s (-1.4%)0.671s81.00x
▲ VercelNitro3.309s (-7.3% 🟢)3.880s (-6.2% 🟢)0.571s81.04x
▲ VercelNext.js (Turbopack)3.477s (+7.2% 🔺)4.009s (+6.9% 🔺)0.532s81.09x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)0.136s (+9.3% 🔺)1.006s (~)0.000s (NaN%)1.012s (~)0.877s101.00x
💻 LocalNext.js (Turbopack)0.142s (+1.4%)1.003s (~)0.019s (+24.5% 🔺)1.031s (~)0.889s101.04x
🌐 RedisNext.js (Turbopack)0.157s (~)1.005s (~)0.000s (+Infinity% 🔺)1.014s (~)0.857s101.16x
💻 LocalNitro0.177s (+1.5%)0.992s (~)0.016s (+12.7% 🔺)1.022s (~)0.845s101.30x
💻 LocalExpress0.177s (~)0.992s (~)0.017s (+3.7%)1.024s (~)0.847s101.31x
🌐 TursoNext.js (Turbopack)0.503s (+10.5% 🔺)0.948s (-4.8%)0.000s (NaN%)1.013s (~)0.510s103.71x
🌐 MongoDBNext.js (Turbopack)0.513s (+3.5%)0.935s (-2.1%)0.000s (-50.0% 🟢)1.013s (~)0.500s103.78x
🐘 PostgresNext.js (Turbopack)1.121s (-50.8% 🟢)1.929s (-30.4% 🟢)0.000s (~)2.019s (-33.1% 🟢)0.898s108.26x
🐘 PostgresNitro2.225s (+2.2%)2.821s (-1.5%)0.000s (+Infinity% 🔺)3.016s (~)0.791s1016.40x
🐘 PostgresExpress2.382s (~)2.661s (~)0.000s (-100.0% 🟢)3.014s (~)0.632s1017.55x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.637s (-0.8%)3.199s (+5.1% 🔺)0.244s (-51.5% 🟢)3.838s (-3.7%)1.201s101.00x
▲ VercelNitro2.728s (+7.0% 🔺)3.094s (+0.9%)0.890s (+162.3% 🔺)4.450s (+17.8% 🔺)1.722s101.03x
▲ VercelExpress6.451s (+150.9% 🔺)5.995s (+92.2% 🔺)0.418s (+6.1% 🔺)7.840s (+99.4% 🔺)1.389s102.45x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)7/8
🐘 PostgresNext.js (Turbopack)7/8
▲ VercelExpress4/8
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local8/8
Next.js (Turbopack)🌐 Starter6/8
Nitro💻 Local8/8
Column Definitions
  • Workflow Time: Runtime reported by workflow (completedAt - createdAt) - primary metric
  • TTFB: Time to First Byte - time from workflow start until first stream byte received (stream benchmarks only)
  • Slurp: Time from first byte to complete stream consumption (stream benchmarks only)
  • Wall Time: Total testbench time (trigger workflow + poll for result)
  • Overhead: Testbench overhead (Wall Time - Workflow Time)
  • Samples: Number of benchmark iterations run
  • vs Fastest: How much slower compared to the fastest configuration for this benchmark

Worlds:

  • 💻 Local: In-memory filesystem world (local development)
  • 🐘 Postgres: PostgreSQL database world (local development)
  • ▲ Vercel: Vercel production/preview deployment
  • 🌐 Starter: Community world (local development)
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)

📋 View full workflow run

@TooTallNateGraphite App

TooTallNate commented Dec 18, 2025

Copy link
Copy Markdown
MemberAuthor

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enhances error debugging for server response validation in the Vercel world package by improving error messages and capturing response bodies when validation fails.

Key Changes:

  • Refactored makeRequest to use a Request object for better error reporting consistency
  • Enhanced error messages to include the full response body and detailed error information when schema validation fails
  • Removed unused ZodError import and simplified error handling logic

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

FileDescription
packages/world-vercel/src/utils.tsImproved error handling in the makeRequest function with better error messages and response body capture
.changeset/whole-lights-camp.mdAdds changeset entry for the patch release documenting the error debugging improvements

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment threadpackages/world-vercel/src/utils.ts
Comment threadpackages/world-vercel/src/utils.ts
);
}

const text = await response.text();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't this be in the try-catch?

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need text in the catch handler, so I think this is fine.

@TooTallNate
TooTallNate merged commit 6cd1a47 into mainDec 18, 2025
157 of 159 checks passed
@TooTallNate
TooTallNate deleted the 12-18-additional_error_debugging_when_failing_to_validate_server_response branch December 18, 2025 23:17
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@TooTallNate@adriandlam
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Additional error debugging when failing to validate server response - #647

Merged
TooTallNate merged 2 commits into
mainfrom
12-18-additional_error_debugging_when_failing_to_validate_server_response
Dec 18, 2025
Merged

Additional error debugging when failing to validate server response#647
TooTallNate merged 2 commits into
mainfrom
12-18-additional_error_debugging_when_failing_to_validate_server_response

Conversation

@TooTallNate

@TooTallNateTooTallNate commented Dec 18, 2025

Copy link
Copy Markdown
Member

Enhanced error debugging for server response validation in the Vercel world package.

What changed?

  • Improved error handling in the makeRequest function:
    • Created a separate Request object for better error reporting
    • Captured the response text before attempting to parse it
    • Enhanced error messages to include the response body when validation fails
    • Simplified error handling by removing the specific ZodError case

How to test?

  1. Make a request that returns an invalid response format
  2. Check the error message in the console, which should now include:
    • The HTTP method and endpoint
    • The detailed error message
    • The full response body for debugging

Why make this change?

This change makes it easier to debug issues when the server returns responses that don't match the expected schema. By including the full response body in the error message, developers can more quickly identify what's wrong with the response format without needing additional debugging steps.

@changeset-bot

changeset-botBot commented Dec 18, 2025

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 709e0e2

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 13 packages
NameType
@workflow/world-vercelPatch
@workflow/cliPatch
@workflow/corePatch
workflowPatch
@workflow/world-testingPatch
@workflow/buildersPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/web-sharedPatch
@workflow/aiPatch
@workflow/astroPatch
@workflow/sveltekitPatch
@workflow/nuxtPatch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel

vercelBot commented Dec 18, 2025

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Dec 18, 2025

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production286011297
✅ 💻 Local Development26208270
✅ 📦 Local Production26208270
✅ 🐘 Local Postgres26208270
✅ 🪟 Windows270027
❌ 🌍 Community Worlds109110120
Total120811351254

❌ Failed Tests

🌍 Community Worlds (11 failed)

mongodb (1 failed):

  • webhookWorkflow

redis (1 failed):

  • webhookWorkflow

starter (8 failed):

  • addTenWorkflow
  • addTenWorkflow
  • retryAttemptCounterWorkflow
  • crossFileErrorWorkflow - stack traces work across imported modules
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step

turso (1 failed):

  • webhookWorkflow

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro2601
✅ example2601
✅ express2601
✅ fastify2601
✅ hono2601
✅ nextjs-turbopack2601
✅ nextjs-webpack2601
✅ nitro2601
✅ nuxt2601
✅ sveltekit2601
✅ vite2601
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable2601
✅ express-stable2601
✅ fastify-stable2601
✅ hono-stable2601
✅ nextjs-turbopack-stable2700
✅ nextjs-webpack-stable2700
✅ nitro-stable2601
✅ nuxt-stable2601
✅ sveltekit-stable2601
✅ vite-stable2601
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable2601
✅ express-stable2601
✅ fastify-stable2601
✅ hono-stable2601
✅ nextjs-turbopack-stable2700
✅ nextjs-webpack-stable2700
✅ nitro-stable2601
✅ nuxt-stable2601
✅ sveltekit-stable2601
✅ vite-stable2601
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable2601
✅ express-stable2601
✅ fastify-stable2601
✅ hono-stable2601
✅ nextjs-turbopack-stable2700
✅ nextjs-webpack-stable2700
✅ nitro-stable2601
✅ nuxt-stable2601
✅ sveltekit-stable2601
✅ vite-stable2601
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack2700
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
❌ mongodb2610
✅ redis-dev300
❌ redis2610
✅ starter-dev300
❌ starter1980
✅ turso-dev300
❌ turso2610

📋 View full workflow run

@github-actions

github-actionsBot commented Dec 18, 2025

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

📈 Comparing against baseline from main branch. Green 🟢 = faster, Red 🔺 = slower.

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)0.037s (-4.8%)1.014s (~)0.976s101.00x
💻 LocalNext.js (Turbopack)0.040s (-2.0%)1.017s (~)0.977s101.07x
💻 LocalNitro0.043s (+1.2%)1.007s (~)0.964s101.14x
💻 LocalExpress0.043s (~)1.007s (~)0.964s101.16x
🌐 RedisNext.js (Turbopack)0.043s (+4.1%)1.018s (~)0.974s101.16x
🌐 MongoDBNext.js (Turbopack)0.052s (-32.9% 🟢)1.014s (~)0.962s101.40x
🌐 TursoNext.js (Turbopack)0.108s (+3.5%)1.014s (~)0.906s102.88x
🐘 PostgresNext.js (Turbopack)0.190s (+68.7% 🔺)1.021s (~)0.831s105.07x
🐘 PostgresNitro0.191s (-42.4% 🟢)1.029s (~)0.838s105.10x
🐘 PostgresExpress0.347s (+3.3%)1.012s (~)0.665s109.29x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)0.539s (-38.4% 🟢)1.452s (-20.0% 🟢)0.912s101.00x
▲ VercelNitro0.575s (+15.3% 🔺)1.448s (+4.7%)0.873s101.07x
▲ VercelExpress0.596s (-9.7% 🟢)1.606s (-21.0% 🟢)1.010s101.10x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)1.080s (-1.1%)2.012s (~)0.932s101.00x
💻 LocalNext.js (Turbopack)1.097s (~)2.012s (~)0.914s101.02x
🌐 RedisNext.js (Turbopack)1.100s (~)2.014s (~)0.914s101.02x
💻 LocalExpress1.112s (~)2.007s (~)0.895s101.03x
💻 LocalNitro1.116s (+0.5%)2.006s (~)0.890s101.03x
🌐 MongoDBNext.js (Turbopack)1.288s (-1.5%)2.012s (~)0.724s101.19x
🌐 TursoNext.js (Turbopack)1.310s (+0.9%)2.012s (~)0.702s101.21x
🐘 PostgresNext.js (Turbopack)2.042s (-16.3% 🟢)2.317s (-23.2% 🟢)0.275s101.89x
🐘 PostgresExpress2.196s (~)3.015s (~)0.818s102.03x
🐘 PostgresNitro2.438s (-0.6%)3.015s (~)0.577s102.26x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.581s (-0.6%)3.587s (+2.0%)1.006s101.00x
▲ VercelNitro2.659s (-2.3%)3.528s (~)0.869s101.03x
▲ VercelExpress2.677s (+1.2%)3.663s (+0.9%)0.986s101.04x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)10.603s (~)11.012s (~)0.409s51.00x
💻 LocalNext.js (Turbopack)10.643s (~)11.018s (~)0.375s51.00x
🌐 RedisNext.js (Turbopack)10.695s (~)11.018s (~)0.323s51.01x
💻 LocalExpress10.787s (~)11.013s (~)0.226s51.02x
💻 LocalNitro10.788s (~)11.012s (~)0.223s51.02x
🌐 MongoDBNext.js (Turbopack)12.208s (-0.8%)13.023s (~)0.815s51.15x
🌐 TursoNext.js (Turbopack)12.222s (~)13.027s (~)0.805s51.15x
🐘 PostgresNext.js (Turbopack)15.242s (-24.8% 🟢)16.031s (-23.8% 🟢)0.788s51.44x
🐘 PostgresNitro20.305s (~)21.040s (~)0.735s51.92x
🐘 PostgresExpress20.356s (~)21.032s (~)0.676s51.92x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro21.551s (~)22.449s (+0.6%)0.898s51.00x
▲ VercelNext.js (Turbopack)21.645s (-5.2% 🟢)22.170s (-6.3% 🟢)0.524s51.00x
▲ VercelExpress22.750s (+5.0%)23.636s (+5.4% 🔺)0.886s51.06x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)1.350s (~)2.008s (~)0.658s151.00x
🌐 RedisNext.js (Turbopack)1.383s (+2.0%)2.011s (~)0.628s151.02x
💻 LocalNitro1.400s (~)2.005s (~)0.605s151.04x
💻 LocalNext.js (Turbopack)1.401s (+1.7%)2.011s (~)0.610s151.04x
💻 LocalExpress1.412s (-0.5%)2.006s (~)0.594s151.05x
🐘 PostgresNext.js (Turbopack)1.987s (-21.8% 🟢)2.405s (-20.2% 🟢)0.418s131.47x
🌐 MongoDBNext.js (Turbopack)2.114s (-2.0%)3.016s (~)0.902s101.57x
🌐 TursoNext.js (Turbopack)2.228s (+2.0%)3.013s (~)0.785s101.65x
🐘 PostgresExpress2.456s (-1.5%)3.012s (~)0.556s101.82x
🐘 PostgresNitro2.670s (+0.8%)3.014s (~)0.345s101.98x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.290s (+16.9% 🔺)4.317s (+14.7% 🔺)1.028s81.00x
▲ VercelNext.js (Turbopack)9.668s (+241.1% 🔺)10.469s (+185.6% 🔺)0.801s32.94x
▲ VercelNitro10.037s (+261.6% 🔺)10.683s (+190.8% 🔺)0.646s33.05x

🔍 Observability: Express | Next.js (Turbopack) | Nitro

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.151s (+2.9%)3.035s (+3.0%)0.884s101.00x
💻 LocalNitro2.177s (-1.1%)3.148s (~)0.971s101.01x
💻 LocalExpress2.235s (-1.0%)3.184s (-0.5%)0.949s101.04x
🌐 StarterNext.js (Turbopack)2.447s (~)3.009s (~)0.562s101.14x
🌐 RedisNext.js (Turbopack)2.510s (+0.8%)3.019s (~)0.509s101.17x
🐘 PostgresNext.js (Turbopack)2.637s (-3.2%)3.021s (~)0.384s101.23x
🐘 PostgresExpress2.859s (-2.5%)3.012s (-3.2%)0.153s101.33x
🐘 PostgresNitro2.961s (-1.8%)3.113s (-13.0% 🟢)0.151s101.38x
🌐 TursoNext.js (Turbopack)4.729s (+1.3%)5.185s (~)0.456s62.20x
🌐 MongoDBNext.js (Turbopack)4.782s (+2.8%)5.185s (~)0.403s62.22x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.984s (-23.1% 🟢)3.770s (-21.4% 🟢)0.786s81.00x
▲ VercelNitro4.269s (+10.2% 🔺)5.033s (+13.4% 🔺)0.764s61.43x
▲ VercelNext.js (Turbopack)4.826s (+37.7% 🔺)5.397s (+32.4% 🔺)0.570s61.62x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)1.354s (-1.5%)2.007s (~)0.653s151.00x
🌐 RedisNext.js (Turbopack)1.393s (+1.2%)2.012s (~)0.618s151.03x
💻 LocalNext.js (Turbopack)1.408s (+1.5%)2.013s (~)0.606s151.04x
💻 LocalNitro1.409s (+0.5%)2.005s (~)0.596s151.04x
💻 LocalExpress1.431s (~)2.006s (~)0.576s151.06x
🐘 PostgresExpress1.686s (-20.9% 🟢)2.011s (-31.3% 🟢)0.325s151.25x
🐘 PostgresNext.js (Turbopack)1.722s (+4.5%)2.012s (~)0.290s151.27x
🐘 PostgresNitro1.988s (+6.9% 🔺)2.597s (+29.3% 🔺)0.609s121.47x
🌐 MongoDBNext.js (Turbopack)2.144s (+0.8%)3.012s (~)0.867s101.58x
🌐 TursoNext.js (Turbopack)2.225s (~)3.013s (~)0.788s101.64x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.650s (-1.3%)3.679s (~)1.029s91.00x
▲ VercelNitro2.653s (+1.0%)3.649s (+1.1%)0.996s91.00x
▲ VercelNext.js (Turbopack)2.849s (+7.5% 🔺)3.685s (+2.3%)0.836s91.08x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.125s (+3.9%)3.008s (+4.4%)0.883s111.00x
💻 LocalNitro2.237s (+1.9%)3.201s (+2.1%)0.964s101.05x
💻 LocalExpress2.279s (-1.4%)3.205s (-1.5%)0.926s101.07x
🌐 StarterNext.js (Turbopack)2.464s (~)3.011s (~)0.547s101.16x
🌐 RedisNext.js (Turbopack)2.538s (+1.8%)3.024s (~)0.487s101.19x
🐘 PostgresNext.js (Turbopack)2.661s (+6.2% 🔺)3.020s (~)0.359s101.25x
🐘 PostgresExpress2.739s (-7.1% 🟢)3.016s (-6.4% 🟢)0.277s101.29x
🐘 PostgresNitro2.878s (+10.9% 🔺)3.466s (+14.6% 🔺)0.588s91.35x
🌐 TursoNext.js (Turbopack)4.787s (+2.7%)5.185s (~)0.398s62.25x
🌐 MongoDBNext.js (Turbopack)4.812s (+1.3%)5.179s (~)0.367s62.26x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.186s (-1.3%)3.857s (-1.4%)0.671s81.00x
▲ VercelNitro3.309s (-7.3% 🟢)3.880s (-6.2% 🟢)0.571s81.04x
▲ VercelNext.js (Turbopack)3.477s (+7.2% 🔺)4.009s (+6.9% 🔺)0.532s81.09x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)0.136s (+9.3% 🔺)1.006s (~)0.000s (NaN%)1.012s (~)0.877s101.00x
💻 LocalNext.js (Turbopack)0.142s (+1.4%)1.003s (~)0.019s (+24.5% 🔺)1.031s (~)0.889s101.04x
🌐 RedisNext.js (Turbopack)0.157s (~)1.005s (~)0.000s (+Infinity% 🔺)1.014s (~)0.857s101.16x
💻 LocalNitro0.177s (+1.5%)0.992s (~)0.016s (+12.7% 🔺)1.022s (~)0.845s101.30x
💻 LocalExpress0.177s (~)0.992s (~)0.017s (+3.7%)1.024s (~)0.847s101.31x
🌐 TursoNext.js (Turbopack)0.503s (+10.5% 🔺)0.948s (-4.8%)0.000s (NaN%)1.013s (~)0.510s103.71x
🌐 MongoDBNext.js (Turbopack)0.513s (+3.5%)0.935s (-2.1%)0.000s (-50.0% 🟢)1.013s (~)0.500s103.78x
🐘 PostgresNext.js (Turbopack)1.121s (-50.8% 🟢)1.929s (-30.4% 🟢)0.000s (~)2.019s (-33.1% 🟢)0.898s108.26x
🐘 PostgresNitro2.225s (+2.2%)2.821s (-1.5%)0.000s (+Infinity% 🔺)3.016s (~)0.791s1016.40x
🐘 PostgresExpress2.382s (~)2.661s (~)0.000s (-100.0% 🟢)3.014s (~)0.632s1017.55x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.637s (-0.8%)3.199s (+5.1% 🔺)0.244s (-51.5% 🟢)3.838s (-3.7%)1.201s101.00x
▲ VercelNitro2.728s (+7.0% 🔺)3.094s (+0.9%)0.890s (+162.3% 🔺)4.450s (+17.8% 🔺)1.722s101.03x
▲ VercelExpress6.451s (+150.9% 🔺)5.995s (+92.2% 🔺)0.418s (+6.1% 🔺)7.840s (+99.4% 🔺)1.389s102.45x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)7/8
🐘 PostgresNext.js (Turbopack)7/8
▲ VercelExpress4/8
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local8/8
Next.js (Turbopack)🌐 Starter6/8
Nitro💻 Local8/8
Column Definitions
  • Workflow Time: Runtime reported by workflow (completedAt - createdAt) - primary metric
  • TTFB: Time to First Byte - time from workflow start until first stream byte received (stream benchmarks only)
  • Slurp: Time from first byte to complete stream consumption (stream benchmarks only)
  • Wall Time: Total testbench time (trigger workflow + poll for result)
  • Overhead: Testbench overhead (Wall Time - Workflow Time)
  • Samples: Number of benchmark iterations run
  • vs Fastest: How much slower compared to the fastest configuration for this benchmark

Worlds:

  • 💻 Local: In-memory filesystem world (local development)
  • 🐘 Postgres: PostgreSQL database world (local development)
  • ▲ Vercel: Vercel production/preview deployment
  • 🌐 Starter: Community world (local development)
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)

📋 View full workflow run

@TooTallNateGraphite App

TooTallNate commented Dec 18, 2025

Copy link
Copy Markdown
MemberAuthor

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enhances error debugging for server response validation in the Vercel world package by improving error messages and capturing response bodies when validation fails.

Key Changes:

  • Refactored makeRequest to use a Request object for better error reporting consistency
  • Enhanced error messages to include the full response body and detailed error information when schema validation fails
  • Removed unused ZodError import and simplified error handling logic

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

FileDescription
packages/world-vercel/src/utils.tsImproved error handling in the makeRequest function with better error messages and response body capture
.changeset/whole-lights-camp.mdAdds changeset entry for the patch release documenting the error debugging improvements

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment threadpackages/world-vercel/src/utils.ts
Comment threadpackages/world-vercel/src/utils.ts
);
}

const text = await response.text();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't this be in the try-catch?

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need text in the catch handler, so I think this is fine.

@TooTallNate
TooTallNate merged commit 6cd1a47 into mainDec 18, 2025
157 of 159 checks passed
@TooTallNate
TooTallNate deleted the 12-18-additional_error_debugging_when_failing_to_validate_server_response branch December 18, 2025 23:17
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@TooTallNate@adriandlam
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Additional error debugging when failing to validate server response - #647

Merged
TooTallNate merged 2 commits into
mainfrom
12-18-additional_error_debugging_when_failing_to_validate_server_response
Dec 18, 2025
Merged

Additional error debugging when failing to validate server response#647
TooTallNate merged 2 commits into
mainfrom
12-18-additional_error_debugging_when_failing_to_validate_server_response

Conversation

@TooTallNate

@TooTallNateTooTallNate commented Dec 18, 2025

Copy link
Copy Markdown
Member

Enhanced error debugging for server response validation in the Vercel world package.

What changed?

  • Improved error handling in the makeRequest function:
    • Created a separate Request object for better error reporting
    • Captured the response text before attempting to parse it
    • Enhanced error messages to include the response body when validation fails
    • Simplified error handling by removing the specific ZodError case

How to test?

  1. Make a request that returns an invalid response format
  2. Check the error message in the console, which should now include:
    • The HTTP method and endpoint
    • The detailed error message
    • The full response body for debugging

Why make this change?

This change makes it easier to debug issues when the server returns responses that don't match the expected schema. By including the full response body in the error message, developers can more quickly identify what's wrong with the response format without needing additional debugging steps.

@changeset-bot

changeset-botBot commented Dec 18, 2025

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 709e0e2

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 13 packages
NameType
@workflow/world-vercelPatch
@workflow/cliPatch
@workflow/corePatch
workflowPatch
@workflow/world-testingPatch
@workflow/buildersPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/web-sharedPatch
@workflow/aiPatch
@workflow/astroPatch
@workflow/sveltekitPatch
@workflow/nuxtPatch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel

vercelBot commented Dec 18, 2025

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Dec 18, 2025

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production286011297
✅ 💻 Local Development26208270
✅ 📦 Local Production26208270
✅ 🐘 Local Postgres26208270
✅ 🪟 Windows270027
❌ 🌍 Community Worlds109110120
Total120811351254

❌ Failed Tests

🌍 Community Worlds (11 failed)

mongodb (1 failed):

  • webhookWorkflow

redis (1 failed):

  • webhookWorkflow

starter (8 failed):

  • addTenWorkflow
  • addTenWorkflow
  • retryAttemptCounterWorkflow
  • crossFileErrorWorkflow - stack traces work across imported modules
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step

turso (1 failed):

  • webhookWorkflow

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro2601
✅ example2601
✅ express2601
✅ fastify2601
✅ hono2601
✅ nextjs-turbopack2601
✅ nextjs-webpack2601
✅ nitro2601
✅ nuxt2601
✅ sveltekit2601
✅ vite2601
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable2601
✅ express-stable2601
✅ fastify-stable2601
✅ hono-stable2601
✅ nextjs-turbopack-stable2700
✅ nextjs-webpack-stable2700
✅ nitro-stable2601
✅ nuxt-stable2601
✅ sveltekit-stable2601
✅ vite-stable2601
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable2601
✅ express-stable2601
✅ fastify-stable2601
✅ hono-stable2601
✅ nextjs-turbopack-stable2700
✅ nextjs-webpack-stable2700
✅ nitro-stable2601
✅ nuxt-stable2601
✅ sveltekit-stable2601
✅ vite-stable2601
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable2601
✅ express-stable2601
✅ fastify-stable2601
✅ hono-stable2601
✅ nextjs-turbopack-stable2700
✅ nextjs-webpack-stable2700
✅ nitro-stable2601
✅ nuxt-stable2601
✅ sveltekit-stable2601
✅ vite-stable2601
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack2700
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
❌ mongodb2610
✅ redis-dev300
❌ redis2610
✅ starter-dev300
❌ starter1980
✅ turso-dev300
❌ turso2610

📋 View full workflow run

@github-actions

github-actionsBot commented Dec 18, 2025

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

📈 Comparing against baseline from main branch. Green 🟢 = faster, Red 🔺 = slower.

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)0.037s (-4.8%)1.014s (~)0.976s101.00x
💻 LocalNext.js (Turbopack)0.040s (-2.0%)1.017s (~)0.977s101.07x
💻 LocalNitro0.043s (+1.2%)1.007s (~)0.964s101.14x
💻 LocalExpress0.043s (~)1.007s (~)0.964s101.16x
🌐 RedisNext.js (Turbopack)0.043s (+4.1%)1.018s (~)0.974s101.16x
🌐 MongoDBNext.js (Turbopack)0.052s (-32.9% 🟢)1.014s (~)0.962s101.40x
🌐 TursoNext.js (Turbopack)0.108s (+3.5%)1.014s (~)0.906s102.88x
🐘 PostgresNext.js (Turbopack)0.190s (+68.7% 🔺)1.021s (~)0.831s105.07x
🐘 PostgresNitro0.191s (-42.4% 🟢)1.029s (~)0.838s105.10x
🐘 PostgresExpress0.347s (+3.3%)1.012s (~)0.665s109.29x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)0.539s (-38.4% 🟢)1.452s (-20.0% 🟢)0.912s101.00x
▲ VercelNitro0.575s (+15.3% 🔺)1.448s (+4.7%)0.873s101.07x
▲ VercelExpress0.596s (-9.7% 🟢)1.606s (-21.0% 🟢)1.010s101.10x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)1.080s (-1.1%)2.012s (~)0.932s101.00x
💻 LocalNext.js (Turbopack)1.097s (~)2.012s (~)0.914s101.02x
🌐 RedisNext.js (Turbopack)1.100s (~)2.014s (~)0.914s101.02x
💻 LocalExpress1.112s (~)2.007s (~)0.895s101.03x
💻 LocalNitro1.116s (+0.5%)2.006s (~)0.890s101.03x
🌐 MongoDBNext.js (Turbopack)1.288s (-1.5%)2.012s (~)0.724s101.19x
🌐 TursoNext.js (Turbopack)1.310s (+0.9%)2.012s (~)0.702s101.21x
🐘 PostgresNext.js (Turbopack)2.042s (-16.3% 🟢)2.317s (-23.2% 🟢)0.275s101.89x
🐘 PostgresExpress2.196s (~)3.015s (~)0.818s102.03x
🐘 PostgresNitro2.438s (-0.6%)3.015s (~)0.577s102.26x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.581s (-0.6%)3.587s (+2.0%)1.006s101.00x
▲ VercelNitro2.659s (-2.3%)3.528s (~)0.869s101.03x
▲ VercelExpress2.677s (+1.2%)3.663s (+0.9%)0.986s101.04x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)10.603s (~)11.012s (~)0.409s51.00x
💻 LocalNext.js (Turbopack)10.643s (~)11.018s (~)0.375s51.00x
🌐 RedisNext.js (Turbopack)10.695s (~)11.018s (~)0.323s51.01x
💻 LocalExpress10.787s (~)11.013s (~)0.226s51.02x
💻 LocalNitro10.788s (~)11.012s (~)0.223s51.02x
🌐 MongoDBNext.js (Turbopack)12.208s (-0.8%)13.023s (~)0.815s51.15x
🌐 TursoNext.js (Turbopack)12.222s (~)13.027s (~)0.805s51.15x
🐘 PostgresNext.js (Turbopack)15.242s (-24.8% 🟢)16.031s (-23.8% 🟢)0.788s51.44x
🐘 PostgresNitro20.305s (~)21.040s (~)0.735s51.92x
🐘 PostgresExpress20.356s (~)21.032s (~)0.676s51.92x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro21.551s (~)22.449s (+0.6%)0.898s51.00x
▲ VercelNext.js (Turbopack)21.645s (-5.2% 🟢)22.170s (-6.3% 🟢)0.524s51.00x
▲ VercelExpress22.750s (+5.0%)23.636s (+5.4% 🔺)0.886s51.06x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)1.350s (~)2.008s (~)0.658s151.00x
🌐 RedisNext.js (Turbopack)1.383s (+2.0%)2.011s (~)0.628s151.02x
💻 LocalNitro1.400s (~)2.005s (~)0.605s151.04x
💻 LocalNext.js (Turbopack)1.401s (+1.7%)2.011s (~)0.610s151.04x
💻 LocalExpress1.412s (-0.5%)2.006s (~)0.594s151.05x
🐘 PostgresNext.js (Turbopack)1.987s (-21.8% 🟢)2.405s (-20.2% 🟢)0.418s131.47x
🌐 MongoDBNext.js (Turbopack)2.114s (-2.0%)3.016s (~)0.902s101.57x
🌐 TursoNext.js (Turbopack)2.228s (+2.0%)3.013s (~)0.785s101.65x
🐘 PostgresExpress2.456s (-1.5%)3.012s (~)0.556s101.82x
🐘 PostgresNitro2.670s (+0.8%)3.014s (~)0.345s101.98x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.290s (+16.9% 🔺)4.317s (+14.7% 🔺)1.028s81.00x
▲ VercelNext.js (Turbopack)9.668s (+241.1% 🔺)10.469s (+185.6% 🔺)0.801s32.94x
▲ VercelNitro10.037s (+261.6% 🔺)10.683s (+190.8% 🔺)0.646s33.05x

🔍 Observability: Express | Next.js (Turbopack) | Nitro

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.151s (+2.9%)3.035s (+3.0%)0.884s101.00x
💻 LocalNitro2.177s (-1.1%)3.148s (~)0.971s101.01x
💻 LocalExpress2.235s (-1.0%)3.184s (-0.5%)0.949s101.04x
🌐 StarterNext.js (Turbopack)2.447s (~)3.009s (~)0.562s101.14x
🌐 RedisNext.js (Turbopack)2.510s (+0.8%)3.019s (~)0.509s101.17x
🐘 PostgresNext.js (Turbopack)2.637s (-3.2%)3.021s (~)0.384s101.23x
🐘 PostgresExpress2.859s (-2.5%)3.012s (-3.2%)0.153s101.33x
🐘 PostgresNitro2.961s (-1.8%)3.113s (-13.0% 🟢)0.151s101.38x
🌐 TursoNext.js (Turbopack)4.729s (+1.3%)5.185s (~)0.456s62.20x
🌐 MongoDBNext.js (Turbopack)4.782s (+2.8%)5.185s (~)0.403s62.22x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.984s (-23.1% 🟢)3.770s (-21.4% 🟢)0.786s81.00x
▲ VercelNitro4.269s (+10.2% 🔺)5.033s (+13.4% 🔺)0.764s61.43x
▲ VercelNext.js (Turbopack)4.826s (+37.7% 🔺)5.397s (+32.4% 🔺)0.570s61.62x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)1.354s (-1.5%)2.007s (~)0.653s151.00x
🌐 RedisNext.js (Turbopack)1.393s (+1.2%)2.012s (~)0.618s151.03x
💻 LocalNext.js (Turbopack)1.408s (+1.5%)2.013s (~)0.606s151.04x
💻 LocalNitro1.409s (+0.5%)2.005s (~)0.596s151.04x
💻 LocalExpress1.431s (~)2.006s (~)0.576s151.06x
🐘 PostgresExpress1.686s (-20.9% 🟢)2.011s (-31.3% 🟢)0.325s151.25x
🐘 PostgresNext.js (Turbopack)1.722s (+4.5%)2.012s (~)0.290s151.27x
🐘 PostgresNitro1.988s (+6.9% 🔺)2.597s (+29.3% 🔺)0.609s121.47x
🌐 MongoDBNext.js (Turbopack)2.144s (+0.8%)3.012s (~)0.867s101.58x
🌐 TursoNext.js (Turbopack)2.225s (~)3.013s (~)0.788s101.64x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.650s (-1.3%)3.679s (~)1.029s91.00x
▲ VercelNitro2.653s (+1.0%)3.649s (+1.1%)0.996s91.00x
▲ VercelNext.js (Turbopack)2.849s (+7.5% 🔺)3.685s (+2.3%)0.836s91.08x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.125s (+3.9%)3.008s (+4.4%)0.883s111.00x
💻 LocalNitro2.237s (+1.9%)3.201s (+2.1%)0.964s101.05x
💻 LocalExpress2.279s (-1.4%)3.205s (-1.5%)0.926s101.07x
🌐 StarterNext.js (Turbopack)2.464s (~)3.011s (~)0.547s101.16x
🌐 RedisNext.js (Turbopack)2.538s (+1.8%)3.024s (~)0.487s101.19x
🐘 PostgresNext.js (Turbopack)2.661s (+6.2% 🔺)3.020s (~)0.359s101.25x
🐘 PostgresExpress2.739s (-7.1% 🟢)3.016s (-6.4% 🟢)0.277s101.29x
🐘 PostgresNitro2.878s (+10.9% 🔺)3.466s (+14.6% 🔺)0.588s91.35x
🌐 TursoNext.js (Turbopack)4.787s (+2.7%)5.185s (~)0.398s62.25x
🌐 MongoDBNext.js (Turbopack)4.812s (+1.3%)5.179s (~)0.367s62.26x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.186s (-1.3%)3.857s (-1.4%)0.671s81.00x
▲ VercelNitro3.309s (-7.3% 🟢)3.880s (-6.2% 🟢)0.571s81.04x
▲ VercelNext.js (Turbopack)3.477s (+7.2% 🔺)4.009s (+6.9% 🔺)0.532s81.09x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)0.136s (+9.3% 🔺)1.006s (~)0.000s (NaN%)1.012s (~)0.877s101.00x
💻 LocalNext.js (Turbopack)0.142s (+1.4%)1.003s (~)0.019s (+24.5% 🔺)1.031s (~)0.889s101.04x
🌐 RedisNext.js (Turbopack)0.157s (~)1.005s (~)0.000s (+Infinity% 🔺)1.014s (~)0.857s101.16x
💻 LocalNitro0.177s (+1.5%)0.992s (~)0.016s (+12.7% 🔺)1.022s (~)0.845s101.30x
💻 LocalExpress0.177s (~)0.992s (~)0.017s (+3.7%)1.024s (~)0.847s101.31x
🌐 TursoNext.js (Turbopack)0.503s (+10.5% 🔺)0.948s (-4.8%)0.000s (NaN%)1.013s (~)0.510s103.71x
🌐 MongoDBNext.js (Turbopack)0.513s (+3.5%)0.935s (-2.1%)0.000s (-50.0% 🟢)1.013s (~)0.500s103.78x
🐘 PostgresNext.js (Turbopack)1.121s (-50.8% 🟢)1.929s (-30.4% 🟢)0.000s (~)2.019s (-33.1% 🟢)0.898s108.26x
🐘 PostgresNitro2.225s (+2.2%)2.821s (-1.5%)0.000s (+Infinity% 🔺)3.016s (~)0.791s1016.40x
🐘 PostgresExpress2.382s (~)2.661s (~)0.000s (-100.0% 🟢)3.014s (~)0.632s1017.55x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.637s (-0.8%)3.199s (+5.1% 🔺)0.244s (-51.5% 🟢)3.838s (-3.7%)1.201s101.00x
▲ VercelNitro2.728s (+7.0% 🔺)3.094s (+0.9%)0.890s (+162.3% 🔺)4.450s (+17.8% 🔺)1.722s101.03x
▲ VercelExpress6.451s (+150.9% 🔺)5.995s (+92.2% 🔺)0.418s (+6.1% 🔺)7.840s (+99.4% 🔺)1.389s102.45x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)7/8
🐘 PostgresNext.js (Turbopack)7/8
▲ VercelExpress4/8
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local8/8
Next.js (Turbopack)🌐 Starter6/8
Nitro💻 Local8/8
Column Definitions
  • Workflow Time: Runtime reported by workflow (completedAt - createdAt) - primary metric
  • TTFB: Time to First Byte - time from workflow start until first stream byte received (stream benchmarks only)
  • Slurp: Time from first byte to complete stream consumption (stream benchmarks only)
  • Wall Time: Total testbench time (trigger workflow + poll for result)
  • Overhead: Testbench overhead (Wall Time - Workflow Time)
  • Samples: Number of benchmark iterations run
  • vs Fastest: How much slower compared to the fastest configuration for this benchmark

Worlds:

  • 💻 Local: In-memory filesystem world (local development)
  • 🐘 Postgres: PostgreSQL database world (local development)
  • ▲ Vercel: Vercel production/preview deployment
  • 🌐 Starter: Community world (local development)
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)

📋 View full workflow run

@TooTallNateGraphite App

TooTallNate commented Dec 18, 2025

Copy link
Copy Markdown
MemberAuthor

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enhances error debugging for server response validation in the Vercel world package by improving error messages and capturing response bodies when validation fails.

Key Changes:

  • Refactored makeRequest to use a Request object for better error reporting consistency
  • Enhanced error messages to include the full response body and detailed error information when schema validation fails
  • Removed unused ZodError import and simplified error handling logic

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

FileDescription
packages/world-vercel/src/utils.tsImproved error handling in the makeRequest function with better error messages and response body capture
.changeset/whole-lights-camp.mdAdds changeset entry for the patch release documenting the error debugging improvements

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment threadpackages/world-vercel/src/utils.ts
Comment threadpackages/world-vercel/src/utils.ts
);
}

const text = await response.text();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't this be in the try-catch?

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need text in the catch handler, so I think this is fine.

@TooTallNate
TooTallNate merged commit 6cd1a47 into mainDec 18, 2025
157 of 159 checks passed
@TooTallNate
TooTallNate deleted the 12-18-additional_error_debugging_when_failing_to_validate_server_response branch December 18, 2025 23:17
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@TooTallNate@adriandlam
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content

Additional error debugging when failing to validate server response - #647

Merged
TooTallNate merged 2 commits into
mainfrom
12-18-additional_error_debugging_when_failing_to_validate_server_response
Dec 18, 2025
Merged

Additional error debugging when failing to validate server response#647
TooTallNate merged 2 commits into
mainfrom
12-18-additional_error_debugging_when_failing_to_validate_server_response

Conversation

@TooTallNate

@TooTallNateTooTallNate commented Dec 18, 2025

Copy link
Copy Markdown
Member

Enhanced error debugging for server response validation in the Vercel world package.

What changed?

  • Improved error handling in the makeRequest function:
    • Created a separate Request object for better error reporting
    • Captured the response text before attempting to parse it
    • Enhanced error messages to include the response body when validation fails
    • Simplified error handling by removing the specific ZodError case

How to test?

  1. Make a request that returns an invalid response format
  2. Check the error message in the console, which should now include:
    • The HTTP method and endpoint
    • The detailed error message
    • The full response body for debugging

Why make this change?

This change makes it easier to debug issues when the server returns responses that don't match the expected schema. By including the full response body in the error message, developers can more quickly identify what's wrong with the response format without needing additional debugging steps.

@changeset-bot

changeset-botBot commented Dec 18, 2025

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 709e0e2

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 13 packages
NameType
@workflow/world-vercelPatch
@workflow/cliPatch
@workflow/corePatch
workflowPatch
@workflow/world-testingPatch
@workflow/buildersPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/web-sharedPatch
@workflow/aiPatch
@workflow/astroPatch
@workflow/sveltekitPatch
@workflow/nuxtPatch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel

vercelBot commented Dec 18, 2025

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Dec 18, 2025

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production286011297
✅ 💻 Local Development26208270
✅ 📦 Local Production26208270
✅ 🐘 Local Postgres26208270
✅ 🪟 Windows270027
❌ 🌍 Community Worlds109110120
Total120811351254

❌ Failed Tests

🌍 Community Worlds (11 failed)

mongodb (1 failed):

  • webhookWorkflow

redis (1 failed):

  • webhookWorkflow

starter (8 failed):

  • addTenWorkflow
  • addTenWorkflow
  • retryAttemptCounterWorkflow
  • crossFileErrorWorkflow - stack traces work across imported modules
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step

turso (1 failed):

  • webhookWorkflow

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro2601
✅ example2601
✅ express2601
✅ fastify2601
✅ hono2601
✅ nextjs-turbopack2601
✅ nextjs-webpack2601
✅ nitro2601
✅ nuxt2601
✅ sveltekit2601
✅ vite2601
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable2601
✅ express-stable2601
✅ fastify-stable2601
✅ hono-stable2601
✅ nextjs-turbopack-stable2700
✅ nextjs-webpack-stable2700
✅ nitro-stable2601
✅ nuxt-stable2601
✅ sveltekit-stable2601
✅ vite-stable2601
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable2601
✅ express-stable2601
✅ fastify-stable2601
✅ hono-stable2601
✅ nextjs-turbopack-stable2700
✅ nextjs-webpack-stable2700
✅ nitro-stable2601
✅ nuxt-stable2601
✅ sveltekit-stable2601
✅ vite-stable2601
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable2601
✅ express-stable2601
✅ fastify-stable2601
✅ hono-stable2601
✅ nextjs-turbopack-stable2700
✅ nextjs-webpack-stable2700
✅ nitro-stable2601
✅ nuxt-stable2601
✅ sveltekit-stable2601
✅ vite-stable2601
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack2700
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
❌ mongodb2610
✅ redis-dev300
❌ redis2610
✅ starter-dev300
❌ starter1980
✅ turso-dev300
❌ turso2610

📋 View full workflow run

@github-actions

github-actionsBot commented Dec 18, 2025

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

📈 Comparing against baseline from main branch. Green 🟢 = faster, Red 🔺 = slower.

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)0.037s (-4.8%)1.014s (~)0.976s101.00x
💻 LocalNext.js (Turbopack)0.040s (-2.0%)1.017s (~)0.977s101.07x
💻 LocalNitro0.043s (+1.2%)1.007s (~)0.964s101.14x
💻 LocalExpress0.043s (~)1.007s (~)0.964s101.16x
🌐 RedisNext.js (Turbopack)0.043s (+4.1%)1.018s (~)0.974s101.16x
🌐 MongoDBNext.js (Turbopack)0.052s (-32.9% 🟢)1.014s (~)0.962s101.40x
🌐 TursoNext.js (Turbopack)0.108s (+3.5%)1.014s (~)0.906s102.88x
🐘 PostgresNext.js (Turbopack)0.190s (+68.7% 🔺)1.021s (~)0.831s105.07x
🐘 PostgresNitro0.191s (-42.4% 🟢)1.029s (~)0.838s105.10x
🐘 PostgresExpress0.347s (+3.3%)1.012s (~)0.665s109.29x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)0.539s (-38.4% 🟢)1.452s (-20.0% 🟢)0.912s101.00x
▲ VercelNitro0.575s (+15.3% 🔺)1.448s (+4.7%)0.873s101.07x
▲ VercelExpress0.596s (-9.7% 🟢)1.606s (-21.0% 🟢)1.010s101.10x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)1.080s (-1.1%)2.012s (~)0.932s101.00x
💻 LocalNext.js (Turbopack)1.097s (~)2.012s (~)0.914s101.02x
🌐 RedisNext.js (Turbopack)1.100s (~)2.014s (~)0.914s101.02x
💻 LocalExpress1.112s (~)2.007s (~)0.895s101.03x
💻 LocalNitro1.116s (+0.5%)2.006s (~)0.890s101.03x
🌐 MongoDBNext.js (Turbopack)1.288s (-1.5%)2.012s (~)0.724s101.19x
🌐 TursoNext.js (Turbopack)1.310s (+0.9%)2.012s (~)0.702s101.21x
🐘 PostgresNext.js (Turbopack)2.042s (-16.3% 🟢)2.317s (-23.2% 🟢)0.275s101.89x
🐘 PostgresExpress2.196s (~)3.015s (~)0.818s102.03x
🐘 PostgresNitro2.438s (-0.6%)3.015s (~)0.577s102.26x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.581s (-0.6%)3.587s (+2.0%)1.006s101.00x
▲ VercelNitro2.659s (-2.3%)3.528s (~)0.869s101.03x
▲ VercelExpress2.677s (+1.2%)3.663s (+0.9%)0.986s101.04x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)10.603s (~)11.012s (~)0.409s51.00x
💻 LocalNext.js (Turbopack)10.643s (~)11.018s (~)0.375s51.00x
🌐 RedisNext.js (Turbopack)10.695s (~)11.018s (~)0.323s51.01x
💻 LocalExpress10.787s (~)11.013s (~)0.226s51.02x
💻 LocalNitro10.788s (~)11.012s (~)0.223s51.02x
🌐 MongoDBNext.js (Turbopack)12.208s (-0.8%)13.023s (~)0.815s51.15x
🌐 TursoNext.js (Turbopack)12.222s (~)13.027s (~)0.805s51.15x
🐘 PostgresNext.js (Turbopack)15.242s (-24.8% 🟢)16.031s (-23.8% 🟢)0.788s51.44x
🐘 PostgresNitro20.305s (~)21.040s (~)0.735s51.92x
🐘 PostgresExpress20.356s (~)21.032s (~)0.676s51.92x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro21.551s (~)22.449s (+0.6%)0.898s51.00x
▲ VercelNext.js (Turbopack)21.645s (-5.2% 🟢)22.170s (-6.3% 🟢)0.524s51.00x
▲ VercelExpress22.750s (+5.0%)23.636s (+5.4% 🔺)0.886s51.06x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)1.350s (~)2.008s (~)0.658s151.00x
🌐 RedisNext.js (Turbopack)1.383s (+2.0%)2.011s (~)0.628s151.02x
💻 LocalNitro1.400s (~)2.005s (~)0.605s151.04x
💻 LocalNext.js (Turbopack)1.401s (+1.7%)2.011s (~)0.610s151.04x
💻 LocalExpress1.412s (-0.5%)2.006s (~)0.594s151.05x
🐘 PostgresNext.js (Turbopack)1.987s (-21.8% 🟢)2.405s (-20.2% 🟢)0.418s131.47x
🌐 MongoDBNext.js (Turbopack)2.114s (-2.0%)3.016s (~)0.902s101.57x
🌐 TursoNext.js (Turbopack)2.228s (+2.0%)3.013s (~)0.785s101.65x
🐘 PostgresExpress2.456s (-1.5%)3.012s (~)0.556s101.82x
🐘 PostgresNitro2.670s (+0.8%)3.014s (~)0.345s101.98x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.290s (+16.9% 🔺)4.317s (+14.7% 🔺)1.028s81.00x
▲ VercelNext.js (Turbopack)9.668s (+241.1% 🔺)10.469s (+185.6% 🔺)0.801s32.94x
▲ VercelNitro10.037s (+261.6% 🔺)10.683s (+190.8% 🔺)0.646s33.05x

🔍 Observability: Express | Next.js (Turbopack) | Nitro

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.151s (+2.9%)3.035s (+3.0%)0.884s101.00x
💻 LocalNitro2.177s (-1.1%)3.148s (~)0.971s101.01x
💻 LocalExpress2.235s (-1.0%)3.184s (-0.5%)0.949s101.04x
🌐 StarterNext.js (Turbopack)2.447s (~)3.009s (~)0.562s101.14x
🌐 RedisNext.js (Turbopack)2.510s (+0.8%)3.019s (~)0.509s101.17x
🐘 PostgresNext.js (Turbopack)2.637s (-3.2%)3.021s (~)0.384s101.23x
🐘 PostgresExpress2.859s (-2.5%)3.012s (-3.2%)0.153s101.33x
🐘 PostgresNitro2.961s (-1.8%)3.113s (-13.0% 🟢)0.151s101.38x
🌐 TursoNext.js (Turbopack)4.729s (+1.3%)5.185s (~)0.456s62.20x
🌐 MongoDBNext.js (Turbopack)4.782s (+2.8%)5.185s (~)0.403s62.22x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.984s (-23.1% 🟢)3.770s (-21.4% 🟢)0.786s81.00x
▲ VercelNitro4.269s (+10.2% 🔺)5.033s (+13.4% 🔺)0.764s61.43x
▲ VercelNext.js (Turbopack)4.826s (+37.7% 🔺)5.397s (+32.4% 🔺)0.570s61.62x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)1.354s (-1.5%)2.007s (~)0.653s151.00x
🌐 RedisNext.js (Turbopack)1.393s (+1.2%)2.012s (~)0.618s151.03x
💻 LocalNext.js (Turbopack)1.408s (+1.5%)2.013s (~)0.606s151.04x
💻 LocalNitro1.409s (+0.5%)2.005s (~)0.596s151.04x
💻 LocalExpress1.431s (~)2.006s (~)0.576s151.06x
🐘 PostgresExpress1.686s (-20.9% 🟢)2.011s (-31.3% 🟢)0.325s151.25x
🐘 PostgresNext.js (Turbopack)1.722s (+4.5%)2.012s (~)0.290s151.27x
🐘 PostgresNitro1.988s (+6.9% 🔺)2.597s (+29.3% 🔺)0.609s121.47x
🌐 MongoDBNext.js (Turbopack)2.144s (+0.8%)3.012s (~)0.867s101.58x
🌐 TursoNext.js (Turbopack)2.225s (~)3.013s (~)0.788s101.64x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.650s (-1.3%)3.679s (~)1.029s91.00x
▲ VercelNitro2.653s (+1.0%)3.649s (+1.1%)0.996s91.00x
▲ VercelNext.js (Turbopack)2.849s (+7.5% 🔺)3.685s (+2.3%)0.836s91.08x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.125s (+3.9%)3.008s (+4.4%)0.883s111.00x
💻 LocalNitro2.237s (+1.9%)3.201s (+2.1%)0.964s101.05x
💻 LocalExpress2.279s (-1.4%)3.205s (-1.5%)0.926s101.07x
🌐 StarterNext.js (Turbopack)2.464s (~)3.011s (~)0.547s101.16x
🌐 RedisNext.js (Turbopack)2.538s (+1.8%)3.024s (~)0.487s101.19x
🐘 PostgresNext.js (Turbopack)2.661s (+6.2% 🔺)3.020s (~)0.359s101.25x
🐘 PostgresExpress2.739s (-7.1% 🟢)3.016s (-6.4% 🟢)0.277s101.29x
🐘 PostgresNitro2.878s (+10.9% 🔺)3.466s (+14.6% 🔺)0.588s91.35x
🌐 TursoNext.js (Turbopack)4.787s (+2.7%)5.185s (~)0.398s62.25x
🌐 MongoDBNext.js (Turbopack)4.812s (+1.3%)5.179s (~)0.367s62.26x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.186s (-1.3%)3.857s (-1.4%)0.671s81.00x
▲ VercelNitro3.309s (-7.3% 🟢)3.880s (-6.2% 🟢)0.571s81.04x
▲ VercelNext.js (Turbopack)3.477s (+7.2% 🔺)4.009s (+6.9% 🔺)0.532s81.09x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)0.136s (+9.3% 🔺)1.006s (~)0.000s (NaN%)1.012s (~)0.877s101.00x
💻 LocalNext.js (Turbopack)0.142s (+1.4%)1.003s (~)0.019s (+24.5% 🔺)1.031s (~)0.889s101.04x
🌐 RedisNext.js (Turbopack)0.157s (~)1.005s (~)0.000s (+Infinity% 🔺)1.014s (~)0.857s101.16x
💻 LocalNitro0.177s (+1.5%)0.992s (~)0.016s (+12.7% 🔺)1.022s (~)0.845s101.30x
💻 LocalExpress0.177s (~)0.992s (~)0.017s (+3.7%)1.024s (~)0.847s101.31x
🌐 TursoNext.js (Turbopack)0.503s (+10.5% 🔺)0.948s (-4.8%)0.000s (NaN%)1.013s (~)0.510s103.71x
🌐 MongoDBNext.js (Turbopack)0.513s (+3.5%)0.935s (-2.1%)0.000s (-50.0% 🟢)1.013s (~)0.500s103.78x
🐘 PostgresNext.js (Turbopack)1.121s (-50.8% 🟢)1.929s (-30.4% 🟢)0.000s (~)2.019s (-33.1% 🟢)0.898s108.26x
🐘 PostgresNitro2.225s (+2.2%)2.821s (-1.5%)0.000s (+Infinity% 🔺)3.016s (~)0.791s1016.40x
🐘 PostgresExpress2.382s (~)2.661s (~)0.000s (-100.0% 🟢)3.014s (~)0.632s1017.55x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.637s (-0.8%)3.199s (+5.1% 🔺)0.244s (-51.5% 🟢)3.838s (-3.7%)1.201s101.00x
▲ VercelNitro2.728s (+7.0% 🔺)3.094s (+0.9%)0.890s (+162.3% 🔺)4.450s (+17.8% 🔺)1.722s101.03x
▲ VercelExpress6.451s (+150.9% 🔺)5.995s (+92.2% 🔺)0.418s (+6.1% 🔺)7.840s (+99.4% 🔺)1.389s102.45x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)7/8
🐘 PostgresNext.js (Turbopack)7/8
▲ VercelExpress4/8
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local8/8
Next.js (Turbopack)🌐 Starter6/8
Nitro💻 Local8/8
Column Definitions
  • Workflow Time: Runtime reported by workflow (completedAt - createdAt) - primary metric
  • TTFB: Time to First Byte - time from workflow start until first stream byte received (stream benchmarks only)
  • Slurp: Time from first byte to complete stream consumption (stream benchmarks only)
  • Wall Time: Total testbench time (trigger workflow + poll for result)
  • Overhead: Testbench overhead (Wall Time - Workflow Time)
  • Samples: Number of benchmark iterations run
  • vs Fastest: How much slower compared to the fastest configuration for this benchmark

Worlds:

  • 💻 Local: In-memory filesystem world (local development)
  • 🐘 Postgres: PostgreSQL database world (local development)
  • ▲ Vercel: Vercel production/preview deployment
  • 🌐 Starter: Community world (local development)
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)

📋 View full workflow run

@TooTallNateGraphite App

TooTallNate commented Dec 18, 2025

Copy link
Copy Markdown
MemberAuthor

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enhances error debugging for server response validation in the Vercel world package by improving error messages and capturing response bodies when validation fails.

Key Changes:

  • Refactored makeRequest to use a Request object for better error reporting consistency
  • Enhanced error messages to include the full response body and detailed error information when schema validation fails
  • Removed unused ZodError import and simplified error handling logic

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

FileDescription
packages/world-vercel/src/utils.tsImproved error handling in the makeRequest function with better error messages and response body capture
.changeset/whole-lights-camp.mdAdds changeset entry for the patch release documenting the error debugging improvements

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment threadpackages/world-vercel/src/utils.ts
Comment threadpackages/world-vercel/src/utils.ts
);
}

const text = await response.text();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't this be in the try-catch?

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need text in the catch handler, so I think this is fine.

@TooTallNate
TooTallNate merged commit 6cd1a47 into mainDec 18, 2025
157 of 159 checks passed
@TooTallNate
TooTallNate deleted the 12-18-additional_error_debugging_when_failing_to_validate_server_response branch December 18, 2025 23:17
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@TooTallNate@adriandlam