Skip to content

Dont swallow errors intentionally in browser extension fetchBlobContentLines()

Created by: felixfbecker

https://sourcegraph.com/github.com/sourcegraph/sourcegraph@fd9eef0b5893dfb3358d2a3358d15f3e9b14ca9e/-/blob/browser/src/shared/repo/backend.tsx#L141-151

I lost time debugging an issue where we were passing the wrong parameters to fetch a file, but instead of getting a file-does-not-exist error, the code just returns an empty array. It does the same if the repository doesn't exist or commit. This is dangerous because any bug would make the the application just assume the file is empty and silently cause codeintel to not work.