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

Add Log function Utility. #1

Open
6 tasks
samuel-vergara-leon opened this issue Feb 3, 2022 · 1 comment
Open
6 tasks

Add Log function Utility. #1

samuel-vergara-leon opened this issue Feb 3, 2022 · 1 comment
Labels
EE-3 Estimation Effor 3

Comments

@samuel-vergara-leon
Copy link

samuel-vergara-leon commented Feb 3, 2022

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 in production no console messages are shown (maybe adding a guard over process.env.NODE_ENV == 'production').
  • When in production a new entry in the Error DB table should be included.
  • Console.log can be seen in testing and dev environments.
  • Logs can be of type server or logic, and render, client (default). Uses the function sendError created 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.
  • It has parameters error, location and type.
  • returns true if the request succeeded, forcibly console.log if failed and returns false.
@heliomar-pena heliomar-pena transferred this issue from Azordev/maps-project Feb 3, 2022
@heliomar-pena heliomar-pena added the EE-3 Estimation Effor 3 label Feb 24, 2022
@heliomar-pena
Copy link
Collaborator

I think this issue requires a rewrite

@anaceciliamolinares anaceciliamolinares changed the title Add Log function util Add Log function Utility. Mar 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
EE-3 Estimation Effor 3
Projects
None yet
Development

No branches or pull requests

2 participants