sweepai / sweep

Sweep: open-source AI-powered Software Developer for small features and bug fixes.
https://sweep.dev
Other
7.43k stars 425 forks source link

Sweep: Add traceback to error logs in sweepai/core/vector_db.py #1582

Open sweep-nightly[bot] opened 1 year ago

sweep-nightly[bot] commented 1 year ago

In the file sweepai/core/vector_db.py, the logger.error() function is used several times to log errors. However, traceback is not used in these instances. To improve error logging and make debugging easier, traceback should be added to these logs.

Here are the lines where changes should be made:

For each of these, add traceback.format_exc() to the log message to include the traceback in the log. For example, the change for line 83 would look like this:

logger.error(f"Error occurred when sending request to Hugging Face endpoint: {e}\n{traceback.format_exc()}")

sweep-nightly[bot] commented 1 year ago

0%


❌ Unable to Complete PR

It looks like an issue has occurred around fetching the files. Perhaps the repo has not been initialized. If this error persists contact team@sweep.dev.

@sweep-nightly[bot], please edit the issue description to include more details and I will automatically relaunch.

For bonus GPT-4 tickets, please report this bug on Discord.


🎉 Latest improvements to Sweep:


💡 To recreate the pull request edit the issue title or description. To tweak the pull request, leave a comment on the pull request.