Skip to content

fix(scope): improve error message when Source object is missing from local scope#10294

Merged
davidfirst merged 7 commits intomasterfrom
fix-missing-source-error-message
Apr 15, 2026
Merged

fix(scope): improve error message when Source object is missing from local scope#10294
davidfirst merged 7 commits intomasterfrom
fix-missing-source-error-message

Conversation

@davidfirst
Copy link
Copy Markdown
Member

When a Version object exists locally but a referenced Source blob is missing (rare scope corruption, e.g. interrupted import), the error gave no hint on how to recover. bit import --objects alone won't fix it because the remote short-circuits via returnNothingIfGivenVersionExists when the Version hash already exists locally.

The error now tells the user to run bit import <id>@<version> --objects --all-history, which bypasses the delta optimization and re-fetches all referenced objects.

Copilot AI review requested due to automatic review settings April 14, 2026 20:13
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Improves the actionable guidance in the error thrown when a Version exists locally but a referenced Source blob is missing from the local scope (e.g., scope corruption after an interrupted import), by suggesting a recovery command that re-fetches object history.

Changes:

  • Expand the “failed loading file …” error into a multi-line message that explains the likely cause (missing Source object).
  • Add a suggested recovery command: bit import <id>@<version> --objects --all-history.

Comment thread scopes/scope/objects/models/model-component.ts Outdated
Comment thread scopes/scope/objects/models/model-component.ts
Copilot AI review requested due to automatic review settings April 14, 2026 20:30
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

Copilot AI review requested due to automatic review settings April 15, 2026 15:29
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comment thread scopes/scope/objects/models/model-component.ts
@davidfirst davidfirst enabled auto-merge (squash) April 15, 2026 16:34
@davidfirst davidfirst merged commit 6359421 into master Apr 15, 2026
12 checks passed
@davidfirst davidfirst deleted the fix-missing-source-error-message branch April 15, 2026 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants