When it comes to real-time code, problems often arise. We, as developers, have to manage these types of errors in the best possible way to achieve these goals:
- You know what the problem is and where the code originated
- End-user don't have to see the error
- Messages contain useful information
- Being in production does not imply any error reporting by console.
I suggest making a reusable function to deal with messages in code.
Checklist
When it comes to real-time code, problems often arise. We, as developers, have to manage these types of errors in the best possible way to achieve these goals:
I suggest making a reusable function to deal with messages in code.
Checklist
process.env.NODE_ENV == 'production').logic, andrender,client(default). Uses the functionsendErrorcreated in [THIS PR].(Added mutation and hook to save errors dasher-user#77). Logic being bad code, render being something that breaker app visually , and server something related to client/server communication.error,locationandtype.