-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Summary
Standardize API error handling and remove no-useless-catch by letting Axios errors map to a single ApiError path.
Context
In src/utils/api.ts:
- handleApiError throws, but many call sites use return handleApiError(err), which is misleading and may confuse types/control flow.
- Some try/catch blocks only rethrow, triggering no-useless-catch.
Tasks
- Replace return handleApiError(err) with throw handleApiError(err) or just let the error bubble if no mapping is needed.
- Remove try/catch wrappers that merely rethrow.
- Align function signatures and docs: helpers throw ApiError on failure.
- Audit callers to ensure errors are caught where UX shows toasts or error states.
Acceptance Criteria
- npm run lint passes with no-useless-catch resolved.
- Consistent, typed throw behavior across API helpers; no silent returns on failure.
- Error toasts/messages still display meaningful content for users.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request