Clean up error handling for some edge cases to prevent panic (#47513)

Release Notes:

- Improved error handling in the dev container crate to prevent panics
9569157743KyleBarton committed on 1/23/2026, 9:22:08 PM· committed by GitHubparent38821a6
1 file changedLine totals unavailable