You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bug (backend): dead null check in newQuotes.approve() — git === null never true, git init failure crashes with raw TypeError #8364
On failure this yields data === undefined (which add() checks correctly):
// new-quotes.ts:59if(git===undefined)thrownewMonkeyError(500,"Git not available.");
But approve() checks against null instead, making the guard dead code:
// new-quotes.ts:150if(git===null)thrownewMonkeyError(500,"Git not available.");
If git initialization failed at import time, the check passes, execution reaches line 181 (await git.pull("upstream", "master")) and crashes with a raw TypeError: Cannot read properties of undefined instead of the intended structured 500 MonkeyError.
Expected Behavior
Line 150 should mirror line 59:
if(git===undefined)thrownewMonkeyError(500,"Git not available.");
Steps To Reproduce
Deploy the backend where simpleGit(...) init throws (e.g. repo path unavailable).
Approve a quote as a quote moderator.
Endpoint responds with an unhandled TypeError rather than the expected 500 "Git not available." error shape.
Activity
priyanshu1976 commentedon Aug 26, 2026
@fehmer can i work on this issue ??