fix: two polling bugs — correspondent 400 and Agrarmonitor 403
Build and Push Multi-Platform Images / build-and-push (push) Successful in 30s

- 400 on Korrespondenten-Sync: getCorrespondentByName was called with
  searchName "(12345)" but checked exact match against full displayName
  "Firma (12345)". Always returned null → duplicate addCorrespondent on
  every run → Paperless 400. Fix: search by displayName directly.

- 403 on Livesearch: cached Agrarmonitor session expired. Fix: detect
  401/403 from connector, call clearClient() to invalidate cache, break
  out of the polling loop so next cron run re-authenticates.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-23 16:25:47 +02:00
parent 1d11d8a3bd
commit 74cd2477f1
2 changed files with 13 additions and 2 deletions
@@ -56,6 +56,10 @@ export class AgrarmonitorService {
return this.client;
}
clearClient(): void {
this.client = null;
}
async getStatus(): Promise<AgrarmonitorStatusDto> {
try {
const client = await this.getClient();