Skip to content

[MEDIUM] M5: OrganizationContactSyncJob does not catch Throwable — NC34 Error kills entire cron pass #345

Description

@rubenvdlinde

Severity: MEDIUM

Location: lib/BackgroundJob/OrganizationContactSyncJob.php lines 89–98

Description:
OrganizationContactSyncJob::run() calls performScheduledSync() without a try/catch block. Today this works because performScheduledSync internally catches Exception. However, on Nextcloud 34 the \OC::$server->get() calls remaining in the service layer (see H1) throw Error, not Exception. An uncaught Error in a background job kills the entire cron pass, preventing all subsequent jobs from running.

Suggested fix:
Wrap the performScheduledSync() call in try { ... } catch (\Throwable $e) { $this->logger->error(...); } so that a fatal in this job does not terminate the cron worker.


Source: deep team-reviewer pass 2026-05-27

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions