Skip to content

fix: replace catch (error: any) with unknown and type guards in stell…#115

Merged
Smartdevs17 merged 1 commit intoSmartdevs17:mainfrom
abdesigns1:fix/catch-error-unknown-type-guards
Mar 30, 2026
Merged

fix: replace catch (error: any) with unknown and type guards in stell…#115
Smartdevs17 merged 1 commit intoSmartdevs17:mainfrom
abdesigns1:fix/catch-error-unknown-type-guards

Conversation

@abdesigns1
Copy link
Copy Markdown
Contributor

Closes #30

Changes

  • Replaced catch (error: any) with catch (error: unknown) in stellar.service.ts
  • Added instanceof Error type guard before accessing .message
  • Added object shape check for Axios-style .response property
  • Falls back to 'Unknown error' for non-Error throws

Testing

  • npx tsc --noEmit passes with no errors
  • npx eslint src/services/stellar.service.ts returns 0 errors

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 24, 2026

@abdesigns1 is attempting to deploy a commit to the smartdevs17's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave
Copy link
Copy Markdown

drips-wave bot commented Mar 24, 2026

@abdesigns1 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Smartdevs17
Copy link
Copy Markdown
Owner

resolve conflicts

@abdesigns1
Copy link
Copy Markdown
Contributor Author

Merge conflict resolved and branch updated. Ready for review!

@Smartdevs17
Copy link
Copy Markdown
Owner

kindly resolved conflict

@Smartdevs17
Copy link
Copy Markdown
Owner

fix merge conflicts

@abdesigns1 abdesigns1 force-pushed the fix/catch-error-unknown-type-guards branch from f7f5ae6 to b087ecb Compare March 27, 2026 17:00
@abdesigns1
Copy link
Copy Markdown
Contributor Author

Hi @Smartdevs17, merge conflicts have been resolved, and the branch is up to date.
Could you please approve the workflow so the Quality Gate check can run? Ready for review!

@Smartdevs17
Copy link
Copy Markdown
Owner

⚠️ This PR has merge conflicts and cannot be merged. Please resolve the conflicts and update the PR.

@abdesigns1 abdesigns1 force-pushed the fix/catch-error-unknown-type-guards branch from b087ecb to 22ca73e Compare March 29, 2026 20:30
@abdesigns1
Copy link
Copy Markdown
Contributor Author

Conflicts resolved and branch updated. Kindly review on time before others start working on the file to avoid another conflict

@Smartdevs17 Smartdevs17 merged commit e82571b into Smartdevs17:main Mar 30, 2026
1 of 2 checks passed
Sign up for free to 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.

Fix: Replace catch(error: any) with proper error typing

2 participants