Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Updates to the winning submission for enrich processor #54

Merged
merged 3 commits into from
Oct 21, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Restore deleted code
  • Loading branch information
callmekatootie committed Oct 21, 2020
commit 8ac769bc4604e866977dfc8295c881dbc5c70fca
4 changes: 4 additions & 0 deletions src/common/service-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,10 @@ function getServiceMethods (Model, createSchema, patchSchema, searchSchema, buil
try {
return await esHelper.searchElasticSearch(resource, query, auth)
} catch (err) {
// return error if enrich fails
if (resource === 'user' && query.enrich) {
throw errors.elasticSearchEnrichError(err.message)
}
logger.logFullError(err)
}

Expand Down