Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[movex, movex-master] Wrap Reducer & Optional Methods in a Try/Catch Block #224

Open
GabrielCTroia opened this issue Sep 29, 2024 · 0 comments
Labels
backend Involves server logic bug Something isn't working client-server sync Client Server Synchronization enhancement New feature or request hacktoberfest Improvements that qualify for Hacktoberfest medium-complexity

Comments

@GabrielCTroia
Copy link
Contributor

GabrielCTroia commented Sep 29, 2024

What:

We need to improve error handling for the reducer and its optional methods within movex(client) and movex-master. This involves wrapping the reducers in a try/catch block to catch any unexpected errors that could cause the server to crash. Additionally, the client should be notified of these errors through the emitAction acknowledgment response.

The key tasks are:

  1. Wrap the reducer and optional methods in try/catch blocks to catch any potential runtime errors.
  2. Modify the emitAction acknowledgment to include error details if an error occurs.
  3. Ensure that the client handles the error and can display an appropriate message or take corrective action.

Why:

Currently, unexpected errors from the reducer or its optional methods can crash the entire server. This disrupts the service and provides no feedback to the client, leaving users unaware of what went wrong.

By catching these errors at the movex-master level, we can prevent server crashes and improve system stability. Additionally, by returning error information through the emitAction acknowledgment, the client can respond appropriately (e.g., displaying an error message).


Expected Outcome:

  • Prevent unexpected server crashes by catching errors in the reducer.
  • Inform the client of errors via the emitAction acknowledgment, allowing for better error handling and user experience.

Why This Matters:

Without proper error handling, the server can crash unexpectedly, making it unreliable. By wrapping these methods in try/catch blocks and informing the client, we can create a more robust system that gracefully handles errors.


Complexity:

Medium
This task involves modifying the reducer logic, improving error handling, and adjusting the communication between the server and client. It requires a good understanding of error handling and client-server interaction in Movex.

@GabrielCTroia GabrielCTroia changed the title [movex, movex-master] Wrap the reducer & it's optional methods in a try/catch [movex, movex-master] Wrap Reducer & Optional Methods in a Try/Catch Block Oct 12, 2024
@GabrielCTroia GabrielCTroia added bug Something isn't working enhancement New feature or request hacktoberfest Improvements that qualify for Hacktoberfest backend Involves server logic medium-complexity client-server sync Client Server Synchronization labels Oct 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Involves server logic bug Something isn't working client-server sync Client Server Synchronization enhancement New feature or request hacktoberfest Improvements that qualify for Hacktoberfest medium-complexity
Projects
None yet
Development

No branches or pull requests

1 participant