overleaf/overleaf · error · SourceFileNotFoundError
Source file not found
Error message
Source file not found
What it means
Branch of LinkedFilesController.handleError mapping SourceFileNotFoundError to 404: refreshing an external/linked file failed because the referenced source file no longer exists at its origin.
Source
Thrown at services/web/app/src/Features/LinkedFiles/LinkedFilesController.mjs:203
refreshLinkedFile: expressify(refreshLinkedFile),
handleError(error, req, res, next) {
if (error instanceof AccessDeniedError) {
res.status(403)
plainTextResponse(
res,
res.locals.translate(
'the_project_that_contains_this_file_is_not_shared_with_you'
)
)
} else if (error instanceof BadDataError) {
res.status(400)
plainTextResponse(res, 'The submitted data is not valid')
} else if (error instanceof BadEntityTypeError) {
res.status(400)
plainTextResponse(res, 'The file is the wrong type')
} else if (error instanceof SourceFileNotFoundError) {
res.status(404)
plainTextResponse(res, 'Source file not found')
} else if (error instanceof ProjectNotFoundError) {
res.status(404)
plainTextResponse(res, 'Project not found')
} else if (error instanceof V1ProjectNotFoundError) {
res.status(409)
plainTextResponse(
res,
'Sorry, the source project is not yet imported to Overleaf v2. Please import it to Overleaf v2 to refresh this file'
)
} else if (error instanceof CompileFailedError) {
res.status(422)
plainTextResponse(
res,
res.locals.translate('generic_linked_file_compile_error')
)
} else if (error instanceof OutputFileFetchFailedError) {
res.status(404)View on GitHub (pinned to 28ad3b03b7)
Solutions
- Re-create or restore the source file and refresh again
- Re-link the file to an existing source
Defensive patterns
Strategy: type-guard
When it happens
Trigger: Thrown at services/web/app/src/Features/LinkedFiles/LinkedFilesController.mjs:203 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of overleaf/overleaf@28ad3b03b7 (2026-09-03).
Data as JSON: /api/errors/7e6baa3cab1e3c0f.
Report an issue: GitHub.