fix(jina-reader): recover after transient errors and use JSON POST API

Clear stale provider error code and account lock after a successful web
fetch (the core fetch handler never consumed the onRequestSuccess
callback), switch Jina Reader to its documented JSON POST request, and
parse the Title: metadata line before falling back to a Markdown heading.
This commit is contained in:
jacardl committed 2026-07-23 16:28:37 +07:00
1 parent 007d372724
commit 3c17d3406b
5 files changed
+176 -9

No files matched your search

+1 -3
View File
@@ -195,13 +195,11 @@ async function handleSingleProviderFetch(body, providerInput, request, apiKey, s
providerSpecificData: newCreds.providerSpecificData,
testStatus: "active"
});
},
onRequestSuccess: async () => {
await clearAccountError(credentials.connectionId, credentials);
}
});
if (result.success) {
await clearAccountError(credentials.connectionId, credentials);
return new Response(JSON.stringify(result.data), {
headers: { "Content-Type": "application/json", "Access-Control-Allow-Origin": "*" }
});