Skip to content

Conversation

@AshNotGrey
Copy link

  • Fix route ordering in invoices.js to ensure GET / comes before GET /:id This ensures query parameter requests are correctly routed to getInvoicesByUser instead of potentially matching the parameterized route.

  • Add optional chaining in ClientList.js to prevent runtime errors Changed user.result.googleId to user?.result?.googleId to handle cases where user object structure is unexpected.

  • Improve error handling in invoiceActions.js and clientActions.js Added END_LOADING dispatch and empty array payload in catch blocks to prevent infinite loading states and enable graceful error handling.

These changes ensure that invoices and customers created by users are properly fetched from the backend and displayed in the UI. The route ordering fix was the primary issue preventing data from being retrieved, while the optional chaining and error handling improvements provide additional robustness to the codebase.

Resolves #42

- Fix route ordering in invoices.js to ensure GET / comes before GET /:id
  This ensures query parameter requests are correctly routed to getInvoicesByUser
  instead of potentially matching the parameterized route.

- Add optional chaining in ClientList.js to prevent runtime errors
  Changed user.result.googleId to user?.result?.googleId to handle cases
  where user object structure is unexpected.

- Improve error handling in invoiceActions.js and clientActions.js
  Added END_LOADING dispatch and empty array payload in catch blocks to
  prevent infinite loading states and enable graceful error handling.

These changes ensure that invoices and customers created by users are
properly fetched from the backend and displayed in the UI. The route
ordering fix was the primary issue preventing data from being retrieved,
while the optional chaining and error handling improvements provide
additional robustness to the codebase.

Resolves panshak#42
@netlify
Copy link

netlify bot commented Nov 10, 2025

👷 Deploy request for accountill pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 7b2b054

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.

invoice and customer records not showing

1 participant