René's URL Explorer Experiment


Title: fix(api): withhold internal failure messages from internal route responses by waleedlatif1 · Pull Request #7015 · simstudioai/sim · GitHub

Open Graph Title: fix(api): withhold internal failure messages from internal route responses by waleedlatif1 · Pull Request #7015 · simstudioai/sim

X Title: fix(api): withhold internal failure messages from internal route responses by waleedlatif1 · Pull Request #7015 · simstudioai/sim

Description: What An orchestration result carrying errorCode: 'internal' holds whatever text the fault happened to have. The workflow-lifecycle.ts catch-alls (:366, :514, :636) return toError(error).message, which for a failed transaction is the driver's SQL: insert into "workflow" ("id") values ($1) - duplicate key value violates unique constraint "workflow_pkey" Three application helpers projected that straight into an OrchestrationError, and internalOrchestrationErrorPolicy rendered classified.message into a 500 body — so raw SQL reached clients. The v2 envelope already scrubbed the same failures (app/api/v2/lib/response.ts:481); internal routes did not. Why it drifted messageForOrchestrationError already encoded the rule, and its TSDoc states it plainly: an unclassified failure "carries whatever text the fault happened to have — a driver's failed SQL, say — so the caller gets the route's own generic wording instead." Two sites honored it. Three hand-rolled it and disagreed. workflow-vfs.ts disagreed with itself: new OrchestrationError( result.errorCode ?? 'internal', // defaults the code result.errorCode === 'internal' ? '…' : result.error ?? '…' // compares the RAW code ) An uncoded failure was therefore classified internal (a 500) while still rendering its own message. The fix Two seams, deliberately both: throwOrchestrationFailure (lib/core/orchestration/types.ts) pairs the code with the message the policy permits for it, so the two cannot disagree. All four hand-rolled helpers collapse onto it. This is the semantic seam — it still knows which text was caller-written. The internal route boundary now scrubs too, matching v2. This is the containment seam — site N+1 cannot reopen the hole by forgetting the rule. The boundary guard has no false-positive cost: new OrchestrationError('internal', …) has zero matches repo-wide, so no call site authors a curated internal message that could be masked. Behavior change internal-coded failures on internal routes now return the route's fallback wording instead of the underlying message. Status codes are unchanged. Two workflow-vfs/workflow-folders fallback strings collapse to one each; no test pinned them. Testing messageForOrchestrationError and throwOrchestrationFailure now have direct tests (previously untested despite 8 call sites). Verified the tests fail without the fix — reverting transition-result.ts reproduces the leak, with the raw duplicate key value violates unique constraint text in the assertion output. bun run type-check clean; bun run check:api-validation passes. 3751 tests passing across app/api; 585 across the touched lib/ areas. Provenance Found by running mattpocock/skills code-review (Fowler smell baseline) over the codebase. Six sibling findings from the same sweep were refuted under adversarial verification and deliberately left out — this was the one that survived.

Open Graph Description: What An orchestration result carrying errorCode: 'internal' holds whatever text the fault happened to have. The workflow-lifecycle.ts catch-alls (:366, :514, :636) return toError(error).mes...

X Description: What An orchestration result carrying errorCode: 'internal' holds whatever text the fault happened to have. The workflow-lifecycle.ts catch-alls (:366, :514, :636) return toError(er...

Opengraph URL: https://github.com/simstudioai/sim/pull/7015

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:32671f29-c4c8-9126-25c4-3b4bec5e2e1a
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idD1B4:14B945:D6AC34:127A390:6AFB5D65
html-safe-nonce3aae75b6e730d943f6c901bbf6a244f0a00ee80ad12a80c6fd86eba1e471504f
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMUI0OjE0Qjk0NTpENkFDMzQ6MTI3QTM5MDo2QUZCNUQ2NSIsInZpc2l0b3JfaWQiOiI3MzgzMzA5NjE2OTgyNzQ0NDIxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacc4212313c861c263ab898ffe81b61dbb1d8dc5445eb1f73edeb9612e71e45442
hovercard-subject-tagpull_request:4343318340
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/simstudioai/sim/pull/7015/files
twitter:imagehttps://avatars.githubusercontent.com/u/40672544?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/40672544?s=400&v=4
og:image:altWhat An orchestration result carrying errorCode: 'internal' holds whatever text the fault happened to have. The workflow-lifecycle.ts catch-alls (:366, :514, :636) return toError(error).mes...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noneea33d13c96d0ff66bd8fa906b193d2213536b78cb06b0c50a4632c58b1418f94
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/simstudioai/sim git https://github.com/simstudioai/sim.git
octolytics-dimension-user_id199344406
octolytics-dimension-user_loginsimstudioai
octolytics-dimension-repository_id912559512
octolytics-dimension-repository_nwosimstudioai/sim
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id912559512
octolytics-dimension-repository_network_root_nwosimstudioai/sim
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release59ef97164c52cf59bd10558ddec9c4f482763988
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/simstudioai/sim/pull/7015/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F7015%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F7015%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=simstudioai%2Fsim
Reloadhttps://github.com/simstudioai/sim/pull/7015/files
Reloadhttps://github.com/simstudioai/sim/pull/7015/files
Reloadhttps://github.com/simstudioai/sim/pull/7015/files
simstudioaihttps://github.com/simstudioai
simhttps://github.com/simstudioai/sim
Codehttps://github.com/simstudioai/sim
Issues129 (129)https://github.com/simstudioai/sim/issues
Pull requests197 (197)https://github.com/simstudioai/sim/pulls
Actionshttps://github.com/simstudioai/sim/actions
Projectshttps://github.com/simstudioai/sim/projects
Security and qualityhttps://github.com/simstudioai/sim/security
Insightshttps://github.com/simstudioai/sim/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fsimstudioai%2Fsim%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fsimstudioai%2Fsim%2Fissues%2Fnew%2Fchoose
waleedlatif1https://github.com/waleedlatif1
staginghttps://github.com/simstudioai/sim/tree/staging
deslop-codebasehttps://github.com/simstudioai/sim/tree/deslop-codebase
Conversation 3 https://github.com/simstudioai/sim/pull/7015
Commits 1 https://github.com/simstudioai/sim/pull/7015/commits
Checks 30 https://github.com/simstudioai/sim/pull/7015/checks
Files changed https://github.com/simstudioai/sim/pull/7015/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/7015/files
fix(api): withhold internal failure messages from internal route responses https://github.com/simstudioai/sim/pull/7015/files#top
Show all changes 1 commit https://github.com/simstudioai/sim/pull/7015/files
017abbf fix(api): withhold internal failure messages from internal route resp… waleedlatif1 Aug 23, 2026 https://github.com/simstudioai/sim/pull/7015/commits/017abbff5da56485eb893f9d8000735164ceb8c2
Clear filters https://github.com/simstudioai/sim/pull/7015/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/7015/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/7015/files
internal-json-route.ts https://github.com/simstudioai/sim/pull/7015/files#diff-97b2f3cc3f5b8e62f536c627f6b57d8e215978dd86069d159dfe2f1e98c88da8
types.test.ts https://github.com/simstudioai/sim/pull/7015/files#diff-703e6cabb05b6e290111744e9d93c08b10f94871196246361bda2b791c5e818f
types.ts https://github.com/simstudioai/sim/pull/7015/files#diff-c5ae99c1474ab4f0af0cd6826e971dbabfbdb0279187c645c50f4b595dd89bc3
folders.ts https://github.com/simstudioai/sim/pull/7015/files#diff-53a7629393eb7f6104a080afc8228f2fafedef4a59f9d4cca0c15bf14becb68c
transition-result.test.ts https://github.com/simstudioai/sim/pull/7015/files#diff-40769f0ce56ae5e7c0c9f5c4da0b2bcff44e2bd2299e605aac4ada2faf0258b4
transition-result.ts https://github.com/simstudioai/sim/pull/7015/files#diff-6eda8e44e2b9aeff78cb0b82f1c0220ecaad7bf09b1487a02348bdaf7dc0e5e5
workflow-folders.ts https://github.com/simstudioai/sim/pull/7015/files#diff-cfa7cf9cb3ce1b66c83a70f42f94c68f84be9d961af9ba86a316b07831564485
workflow-vfs.ts https://github.com/simstudioai/sim/pull/7015/files#diff-e35ca4e2b2ff745a53dc805a7b930a141f551354085e16f4b548d9482017f403
apps/sim/lib/api/server/routes/internal-json-route.tshttps://github.com/simstudioai/sim/pull/7015/files#diff-97b2f3cc3f5b8e62f536c627f6b57d8e215978dd86069d159dfe2f1e98c88da8
View file https://github.com/simstudioai/sim/blob/017abbff5da56485eb893f9d8000735164ceb8c2/apps/sim/lib/api/server/routes/internal-json-route.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/7015/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/7015/files#diff-97b2f3cc3f5b8e62f536c627f6b57d8e215978dd86069d159dfe2f1e98c88da8
https://github.com/simstudioai/sim/pull/7015/files#diff-97b2f3cc3f5b8e62f536c627f6b57d8e215978dd86069d159dfe2f1e98c88da8
https://github.com/simstudioai/sim/pull/7015/files#diff-97b2f3cc3f5b8e62f536c627f6b57d8e215978dd86069d159dfe2f1e98c88da8
https://github.com/simstudioai/sim/pull/7015/files#diff-97b2f3cc3f5b8e62f536c627f6b57d8e215978dd86069d159dfe2f1e98c88da8
apps/sim/lib/core/orchestration/types.test.tshttps://github.com/simstudioai/sim/pull/7015/files#diff-703e6cabb05b6e290111744e9d93c08b10f94871196246361bda2b791c5e818f
View file https://github.com/simstudioai/sim/blob/017abbff5da56485eb893f9d8000735164ceb8c2/apps/sim/lib/core/orchestration/types.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/7015/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/7015/files#diff-703e6cabb05b6e290111744e9d93c08b10f94871196246361bda2b791c5e818f
https://github.com/simstudioai/sim/pull/7015/files#diff-703e6cabb05b6e290111744e9d93c08b10f94871196246361bda2b791c5e818f
apps/sim/lib/core/orchestration/types.tshttps://github.com/simstudioai/sim/pull/7015/files#diff-c5ae99c1474ab4f0af0cd6826e971dbabfbdb0279187c645c50f4b595dd89bc3
View file https://github.com/simstudioai/sim/blob/017abbff5da56485eb893f9d8000735164ceb8c2/apps/sim/lib/core/orchestration/types.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/7015/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/7015/files#diff-c5ae99c1474ab4f0af0cd6826e971dbabfbdb0279187c645c50f4b595dd89bc3
https://github.com/simstudioai/sim/pull/7015/files#diff-c5ae99c1474ab4f0af0cd6826e971dbabfbdb0279187c645c50f4b595dd89bc3
apps/sim/lib/knowledge/application/folders.tshttps://github.com/simstudioai/sim/pull/7015/files#diff-53a7629393eb7f6104a080afc8228f2fafedef4a59f9d4cca0c15bf14becb68c
View file https://github.com/simstudioai/sim/blob/017abbff5da56485eb893f9d8000735164ceb8c2/apps/sim/lib/knowledge/application/folders.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/7015/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/7015/files#diff-53a7629393eb7f6104a080afc8228f2fafedef4a59f9d4cca0c15bf14becb68c
https://github.com/simstudioai/sim/pull/7015/files#diff-53a7629393eb7f6104a080afc8228f2fafedef4a59f9d4cca0c15bf14becb68c
https://github.com/simstudioai/sim/pull/7015/files#diff-53a7629393eb7f6104a080afc8228f2fafedef4a59f9d4cca0c15bf14becb68c
apps/sim/lib/workflows/application/transition-result.test.tshttps://github.com/simstudioai/sim/pull/7015/files#diff-40769f0ce56ae5e7c0c9f5c4da0b2bcff44e2bd2299e605aac4ada2faf0258b4
View file https://github.com/simstudioai/sim/blob/017abbff5da56485eb893f9d8000735164ceb8c2/apps/sim/lib/workflows/application/transition-result.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/7015/{{ revealButtonHref }}
apps/sim/lib/workflows/application/transition-result.tshttps://github.com/simstudioai/sim/pull/7015/files#diff-6eda8e44e2b9aeff78cb0b82f1c0220ecaad7bf09b1487a02348bdaf7dc0e5e5
View file https://github.com/simstudioai/sim/blob/017abbff5da56485eb893f9d8000735164ceb8c2/apps/sim/lib/workflows/application/transition-result.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/7015/{{ revealButtonHref }}
apps/sim/lib/workflows/application/workflow-folders.tshttps://github.com/simstudioai/sim/pull/7015/files#diff-cfa7cf9cb3ce1b66c83a70f42f94c68f84be9d961af9ba86a316b07831564485
View file https://github.com/simstudioai/sim/blob/017abbff5da56485eb893f9d8000735164ceb8c2/apps/sim/lib/workflows/application/workflow-folders.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/7015/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/7015/files#diff-cfa7cf9cb3ce1b66c83a70f42f94c68f84be9d961af9ba86a316b07831564485
https://github.com/simstudioai/sim/pull/7015/files#diff-cfa7cf9cb3ce1b66c83a70f42f94c68f84be9d961af9ba86a316b07831564485
https://github.com/simstudioai/sim/pull/7015/files#diff-cfa7cf9cb3ce1b66c83a70f42f94c68f84be9d961af9ba86a316b07831564485
https://github.com/simstudioai/sim/pull/7015/files#diff-cfa7cf9cb3ce1b66c83a70f42f94c68f84be9d961af9ba86a316b07831564485
apps/sim/lib/workflows/application/workflow-vfs.tshttps://github.com/simstudioai/sim/pull/7015/files#diff-e35ca4e2b2ff745a53dc805a7b930a141f551354085e16f4b548d9482017f403
View file https://github.com/simstudioai/sim/blob/017abbff5da56485eb893f9d8000735164ceb8c2/apps/sim/lib/workflows/application/workflow-vfs.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/7015/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/7015/files#diff-e35ca4e2b2ff745a53dc805a7b930a141f551354085e16f4b548d9482017f403
https://github.com/simstudioai/sim/pull/7015/files#diff-e35ca4e2b2ff745a53dc805a7b930a141f551354085e16f4b548d9482017f403
https://github.com/simstudioai/sim/pull/7015/files#diff-e35ca4e2b2ff745a53dc805a7b930a141f551354085e16f4b548d9482017f403
https://github.com/simstudioai/sim/pull/7015/files#diff-e35ca4e2b2ff745a53dc805a7b930a141f551354085e16f4b548d9482017f403
Please reload this pagehttps://github.com/simstudioai/sim/pull/7015/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.