fix: standardize error handling in follow route#205
Open
pari7maheshwari wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Here’s your PR template filled based on our last discussion (error handling standardization / unsafe catch blocks fix):
PR Title
Standardize error handling in catch blocks and improve type safety
Description
This PR improves error handling consistency across the codebase by replacing unsafe error access patterns in
catchblocks with properly typed and validated error handling. It ensures safer runtime behavior, better TypeScript compliance, and more predictable error logging.Closes #
Type of Change
What Changed
catch (error)blocks to safely handle unknown error typeserror.messageaccess with type-guarded handling (e.g.instanceof Error)How to Test
Run the application locally
Trigger API failures / error scenarios (network failure, invalid request, etc.)
Verify:
Run type checks and ensure no TypeScript errors appear
Checklist
pnpm -r run lintpasses)pnpm -r run typecheckpasses)pnpm -r run test)console.logor debug statements left in the codeScreenshots / Recordings
Not applicable (internal refactor, no UI changes)
Additional Context
This change is part of improving overall reliability and consistency of error handling across the project. It helps prevent runtime issues caused by unsafe assumptions about thrown error types and prepares the codebase for stricter TypeScript configurations in the future.