Skip to content

fix: handle tip service API errors safely - #1244

Merged
RUKAYAT-CODER merged 1 commit into
rinafcode:mainfrom
pharwasz:fix/tip-service-error-handling
Aug 26, 2026
Merged

fix: handle tip service API errors safely#1244
RUKAYAT-CODER merged 1 commit into
rinafcode:mainfrom
pharwasz:fix/tip-service-error-handling

Conversation

@pharwasz

Copy link
Copy Markdown
Contributor

Fixed tip service error handling for non-2xx API responses.

  • Replaced the undefined responseBody error path with null-safe error handling.
  • Added a fallback message: Unable to send tip.
  • Added a regression test covering non-OK API responses.
  • Verified the existing success path continues to pass.

Related Issue

Closes #703

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

Checklist

  • Code follows project style guidelines
  • Self-review completed
  • No console errors
  • Uses Lucide icons consistently
  • Responsive design implemented
  • Starknet best practices followed

Testing

  • pnpm exec vitest run src/services/__tests__/tipService.test.ts
  • 1 test file passed
  • 4 tests passed

Note: Prettier reported a formatting issue in tipService.ts; no functional test failures were observed.

@drips-wave

drips-wave Bot commented Aug 26, 2026

Copy link
Copy Markdown

@pharwasz 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

@RUKAYAT-CODER

Copy link
Copy Markdown
Contributor

Thank you for contributing to the project.

@RUKAYAT-CODER
RUKAYAT-CODER merged commit 0f69c2b into rinafcode:main Aug 26, 2026
6 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.

[Bug] responseBody used before declaration in tipService.ts causes ReferenceError on API errors

2 participants