Skip to content

Knowledge Base: Detail failures in API #871

Description

@shijithkjayan

Context

When we create a knowledge base on Kaapi, the API currently returns a top-level success/failure response. It does not tell us which specific files failed and why they failed (e.g. unsupported extension, parse error, size limit).

Problem

We have a use case (cloning a legacy assistant) where we upload a batch of files to Kaapi and create a new knowledge base. If any file in the batch is rejected during knowledge base creating, we currently have no programmatic way to know which ones failed and why — we only know the overall request failed. This forces us to either pre-filter aggressively on our side or treat the entire clone as a failure.

Request

Please include failed file details in the API response for knowledge base creation / document upload. Specifically:

  • Which files were rejected (by file ID, name, or some identifier)
  • The reason for each rejection (e.g. unsupported_format, file_too_large, parse_error)

Why this matters

With this information, Glific can:

  • Decide whether to proceed with a partial clone or abort
  • Surface meaningful errors to org admins instead of a silent failure

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status
In Review

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions