Skip to content

Commit fd1e2fe

Browse files
shashankbrgowdagarrettjstevens
authored andcommitted
handle exceptions
1 parent 4877a7d commit fd1e2fe

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

packages/apollo-collaboration-server/src/features/features.service.ts

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,11 +127,18 @@ export class FeaturesService {
127127
this.logger.debug(`FeatureId ${featureId} already fetched, skipping...`)
128128
continue
129129
}
130-
const feature = await this.findById(featureId, topLevel)
131-
foundFeatures.push(feature)
132130

133-
for (const id of feature.allIds) {
134-
fetchedFeatureIds.add(id)
131+
try {
132+
const feature = await this.findById(featureId, topLevel)
133+
foundFeatures.push(feature)
134+
for (const id of feature.allIds) {
135+
fetchedFeatureIds.add(id)
136+
}
137+
} catch (error) {
138+
this.logger.error(
139+
`Error occurred while fetching feature ${featureId}`,
140+
error instanceof Error ? error.stack : String(error),
141+
)
135142
}
136143
}
137144
return foundFeatures

0 commit comments

Comments
 (0)