fix: log swallowed errors across scheduler, MCP, UI, and storage layers#154
Open
devin-ai-integration[bot] wants to merge 1 commit into
Open
fix: log swallowed errors across scheduler, MCP, UI, and storage layers#154devin-ai-integration[bot] wants to merge 1 commit into
devin-ai-integration[bot] wants to merge 1 commit into
Conversation
Replace bare catch blocks and silent .catch(() => fallback) patterns with structured console.warn/console.error calls using the existing [tag] prefix convention. Every catch now surfaces the error message for operator debugging while preserving the existing graceful-degradation behavior (return fallback values, continue without crashing). Files changed: - scheduler/service.ts: fireJobCompleteCallbacks - scheduler/parse-with-sonnet.ts: Sonnet judge call - scheduler/schedule.ts: cron parse in computeNextRunAt - onboarding/profiler.ts: Slack API calls - mcp/tools-swe.ts: memory recall in codebase_query, repo_info - mcp/tools-universal.ts: memory recall in searchMemoryCore - mcp/resources.ts: health check, memory recall in resources - ui/api/pages.ts: title extraction - ui/api/identity.ts: avatar meta read, tmp cleanup, prune/delete - ui/api/evolution.ts: poison pile, file stat/read preview - secrets/crypto.ts: encryption key file read - persona/llm-caller.ts: JSON envelope parse - skills/storage.ts: previous content read on upsert/delete - subagents/storage.ts: previous content read on upsert/delete - plugins/curated.ts: overlay stat Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Changed
Replaces ~30 bare
catch {}/catch { return fallback }/.catch(() => fallback)patterns with structuredconsole.warncalls that surface the error message using the existing[tag]prefix convention. Every catch still returns the same fallback value — no behavioral change — but now the error is logged so operators can diagnose failures.Files (15):
service.tsfireJobCompleteCallbacksswallowed callback errorsparse-with-sonnet.tsschedule.tscomputeNextRunAtreturnednullwith no logprofiler.ts.catch(() => null)) with no tracetools-swe.tsrecallEpisodes/recallFactsfailures incodebase_queryandrepo_infotools-universal.tsrecallEpisodes/recallFacts/findProcedureinsearchMemoryCoreresources.tshealthCheck,recallEpisodes,recallFactsin resource handlerspages.tsextractTitleempty catchidentity.tsreadMetaSync, tmp-file cleanup, old avatar pruning, deleteevolution.tslistPoisonPile,statSync/readFileSyncinreadFilePreviewcrypto.tsllm-caller.tsstorage.tsstorage.tscurated.tsWhy
Bare
catch {}blocks silently swallow errors, making it impossible to diagnose why graceful degradation kicked in. When memory, Slack, scheduling, or file I/O silently fails, the operator has no log trail. These warnings surface the root cause without changing any runtime behavior.How I Tested
All 2640 tests pass unchanged — every fix is additive logging, no behavior change.
Checklist
bun test)bun run lint)bun run typecheck).envfiles includedLink to Devin session: https://app.devin.ai/sessions/fcaafb7496fb40bb95440bc7c00d240b
Requested by: @mcheemaa