Skip to content

Conversation

@Ayushjhawar8
Copy link
Contributor

fix #1400
/claim #1400

@vercel
Copy link

vercel bot commented Oct 24, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
tscircuit-core-benchmarks Ready Ready Preview Comment Oct 25, 2025 5:37pm

Copy link
Contributor

@seveibar seveibar left a comment

Choose a reason for hiding this comment

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

avoid large try catch blocks, instead, do .catch( on the relevant promise to the parts engine

@seveibar
Copy link
Contributor

@Ayushjhawar8 i would start from scratch (for the main implementation file) because the diff is really bad- large try catch blocks are a huge problem and not good

// Check if it's an HTML error page or "Not found"
if (result.includes("<!DOCTYPE") || result.includes("<html")) {
throw new Error(
`Failed to fetch supplier part numbers: Received HTML response instead of JSON. Response starts with: ${result.substring(0, 100)}`,
Copy link
Contributor

Choose a reason for hiding this comment

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

VERY NICE HANDLING!!!!!!!!!

Copy link
Contributor

@seveibar seveibar left a comment

Choose a reason for hiding this comment

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

NICELY DONE!!!!!

@seveibar seveibar merged commit 09045cb into tscircuit:main Oct 25, 2025
10 checks passed
@Ayushjhawar8 Ayushjhawar8 deleted the fixErr branch October 26, 2025 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Handle errors inside the parts engine gracefully

2 participants