Skip to content

Commit 44e2a19

Browse files
authored
refactor(condo): log errors and return null instead of throwing exceptions (#5882)
1 parent 3b928be commit 44e2a19

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

apps/condo/domains/ticket/schema/PredictTicketClassificationService.js

+3
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,9 @@ const PredictTicketClassificationService = new GQLCustomSchema('PredictTicketCla
7878
}
7979
const result = await response.json()
8080
const { prediction: [id] } = result
81+
if (!id) {
82+
return null
83+
}
8184
const ticketClassifier = await getById('TicketClassifier', id)
8285
if (!ticketClassifier) {
8386
throw new GQLError(ERRORS.TICKET_RULE_NOT_FOUND, context)

0 commit comments

Comments
 (0)