fix: check the external loader headers whenever they are set, so Save reports the error (#30434)

This commit is contained in:
G30 2026-09-25 23:26:43 -04:00 • committed by GitHub
parent 301aa8c5bd
commit f8e15f92d1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -169,10 +169,7 @@
toast.error($i18n.t('External Document Loader URL required.'));
return;
}
if (
RAGConfig.CONTENT_EXTRACTION_ENGINE === 'external' &&
RAGConfig.EXTERNAL_DOCUMENT_LOADER_HEADERS
) {
if (RAGConfig.EXTERNAL_DOCUMENT_LOADER_HEADERS) {
try {
const headers = JSON.parse(RAGConfig.EXTERNAL_DOCUMENT_LOADER_HEADERS);
if (headers === null || typeof headers !== 'object' || Array.isArray(headers)) {