aicore / aicore/libmysql

remove console.* messages from lib or mask it under a debug mode flag

Open
#152 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
JavaScript
Stars
2
Forks
1
Avg merge
8m
Merged PRs (30d)
2

Description

We should not log any error messages from the lib directly as it will lead to too many logs. Eg. https://github.com/aicore/libmysql/blob/main/src/utils/db.js#L285

there are two alternatives:

  • Remove all console.error calls, and reject with a {stack and error code}. This will help the receiver decide weather to log it or not.
  • Provide a debug flag during init. or a mix of both.

Related to:

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the console.error call in src/utils/db.js around line 285 and search the library for other console.* calls. Resolve whether the intended behavior is removal, a debug flag, or both, then verify that library errors expose the stack and error code without directly logging them.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, mysql
Domain
databases
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.