Skip to content

Commit

Permalink
take out logger in search.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
aloftus23 committed May 9, 2024
1 parent d84396f commit f29aa69
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions backend/src/api/search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { IsArray, IsInt, IsOptional, IsString, IsUUID } from 'class-validator';
import { Domain } from 'domain';
import S3Client from '../tasks/s3-client';
import * as Papa from 'papaparse';
import logger from '../tools/lambda-logger';

class SearchBody {
@IsInt()
Expand Down Expand Up @@ -65,7 +64,7 @@ export const fetchAllResults = async (
try {
searchResults = await client.searchDomains(request);
} catch (e) {
logger.error(e.meta.body.error);
console.error(e.meta.body.error);
continue;
}
if (searchResults.body.hits.hits.length === 0) break;
Expand Down Expand Up @@ -180,7 +179,7 @@ export const search = wrapHandler(async (event) => {
try {
searchResults = await client.searchDomains(request);
} catch (e) {
logger.error(e.meta.body.error);
console.error(e.meta.body.error);
throw e;
}

Expand Down

0 comments on commit f29aa69

Please sign in to comment.