Skip to content

Commit

Permalink
Silence BundleIndex error (#1308)
Browse files Browse the repository at this point in the history
We can have non-minified files identified by DebugId which do not have a corresponding SourceMap.
In that case we do not want to raise an internal error when no SourceMap is found based on the BundleIndex.
  • Loading branch information
Swatinem authored Sep 25, 2023
1 parent 735add3 commit c0292cf
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions crates/symbolicator-service/src/services/sourcemap_lookup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -810,14 +810,20 @@ impl ArtifactFetcher {
}
}

// If we get to this point, it means that the `BundleIndex` lied to us
tracing::error!(
?key,
?lookup_key,
?index_id,
?bundle_id,
"Indexed file not found in `ArtifactBundle`"
);
// If we get to this point, it means that the `BundleIndex` lied to us.
// However, we do not expect to always have a SourceMap corresponding to a non-minified
// file with a DebugId.
let hit_is_optional = matches!(lookup_key, IndexLookupKey::DebugId(..))
&& key.as_type() == SourceFileType::SourceMap;
if !hit_is_optional {
tracing::error!(
?key,
?lookup_key,
?index_id,
?bundle_id,
"Indexed file not found in `ArtifactBundle`"
);
}

None
}
Expand Down

0 comments on commit c0292cf

Please sign in to comment.