Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(backfill): correct variable name in error handler #115

Merged
merged 1 commit into from
Mar 11, 2025

Conversation

tharropoulos
Copy link
Collaborator

TLDR

Fixed naming conflict between 'error' variable and error logging function in catch block.

Change Summary

Code Changes:

  1. In functions/src/backfill.js:
    • Renamed error variable to err in catch block (line 95) to avoid collision with the error logging function
    • Updated subsequent references to use err instead of error (lines 96-98)

Context

  • The backfill function was using the same name (error) for both the caught exception variable and the error logging function, which could lead to confusion and potential issues
  • This fix ensures proper error handling and logging in the Typesense document import process

PR Checklist

- Rename `error` variable to `err` in catch block to avoid naming conflict
- Error variable was conflicting with the error logging function in the same scope
@tharropoulos tharropoulos merged commit d2b1e7c into typesense:master Mar 11, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants