Skip to content

Type Alias: ReviewAddErrorCode

@kortexya/reasoninglayer


@kortexya/reasoninglayer / ReviewAddErrorCode

ReviewAddErrorCode = "review_sort_unknown" | "review_candidate_unknown" | "review_confidence_out_of_range" | "review_similarity_out_of_range"

Defined in: src/types/reviews.ts:156

The code of a 422 refusal of POST /api/v1/reviews/add.

  • 'review_sort_unknown' — the sort, or a suggested sort, does not exist for the tenant.
  • 'review_candidate_unknown' — a candidate term does not exist for the tenant.
  • 'review_confidence_out_of_range' — confidence, or a suggestion’s confidence, is outside 0 to 1.
  • 'review_similarity_out_of_range' — a candidate’s similarity is outside 0 to 1.

Read it with errorBodyCode(error). An unknown body key is a 422 with no code.

const code: ReviewAddErrorCode = 'review_candidate_unknown';