-
-
Notifications
You must be signed in to change notification settings - Fork 20
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
Add IP database scripts #1120
Add IP database scripts #1120
Conversation
Added script to populate ip address database from maxmind
👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎ This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 6 out of 10 changed files in this pull request and generated 2 comments.
Files not reviewed (4)
- apps/cron-tasks/project.json: Language not supported
- package.json: Language not supported
- apps/cron-tasks/src/utils/slack.ts: Evaluated as low risk
- apps/cron-tasks/src/save-analytics-summary.ts: Evaluated as low risk
Comments suppressed due to low confidence (1)
apps/cron-tasks/src/config/env-config.ts:22
- [nitpick] The conversion of PRISMA_DEBUG to a boolean might not be robust. Consider using a more reliable method to convert environment variables to boolean values.
PRISMA_DEBUG: process.env.PRISMA_DEBUG && process.env.PRISMA_DEBUG.toLocaleLowerCase().startsWith('t'),
@@ -0,0 +1,13 @@ | |||
export function getExceptionLog(error: unknown, includeStack = false) { | |||
const status = (error as any) /** UserFacingError */?.apiRequestError?.status || (error as any) /** ApiRequestError */?.status; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The use of 'as any' is not type-safe. Consider using a more specific type assertion or type guard.
const status = (error as any) /** UserFacingError */?.apiRequestError?.status || (error as any) /** ApiRequestError */?.status; | |
const status = isUserFacingError(error) ? error.apiRequestError?.status : isApiRequestError(error) ? error.status : undefined; |
Copilot is powered by AI, so mistakes are possible. Review output carefully before use.
|
||
logger.info(`Successfully imported ${csvPath} to ${fullTableName}`); | ||
} catch (error) { | ||
logger.error(`Error importing ${csvPath}:`, error); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent error logging. Use getExceptionLog for error logging to ensure consistency and clarity.
logger.error(`Error importing ${csvPath}:`, error); | |
logger.error(getExceptionLog(error), `Error importing ${csvPath}: %s`, error.message); |
Copilot is powered by AI, so mistakes are possible. Review output carefully before use.
Report too large to display inline |
Added script to populate ip address database from maxmind