This PR fixes a potential UnboundLocalError in the API router
by ensuring file_path is initialized before the try block.
## Issue
In the create_source endpoint, file_path was initialized inside the
try block. If an exception occurred before this initialization,
exception handlers that reference file_path would crash with
UnboundLocalError.
## Fix
- Initialize file_path = None before the try block (line 289)
- Add explanatory comment for future maintainers
- Remove duplicate initialization inside the try block
This ensures exception handlers on line 415 can safely reference
file_path without causing runtime errors.
## Testing
- Verified exception handler path no longer crashes
- Confirmed file cleanup works correctly in error cases
Co-authored-by: POWERFULMOVES <POWERFULMOVES@users.noreply.github.com>
Co-authored-by: Claude Code <noreply@anthropic.com>