Scheduler.delete() and AsyncScheduler.delete() currently return bool | Exception — the exception is returned as a value rather than raised, so callers can't handle failures idiomatically and type checkers can't help.
Proposal: return bool (True if deleted, False if the job didn't exist) and raise on unexpected errors, or raise a specific library exception instead of the current blanket except Exception.
This is a breaking API change, so it should land with the next breaking-version bump. Deferred from #117 to keep that PR behavior-compatible. Related TODOs already exist in fastapi_gcp_tasks/scheduler.py and async_scheduler.py.
Scheduler.delete()andAsyncScheduler.delete()currently returnbool | Exception— the exception is returned as a value rather than raised, so callers can't handle failures idiomatically and type checkers can't help.Proposal: return
bool(Trueif deleted,Falseif the job didn't exist) and raise on unexpected errors, or raise a specific library exception instead of the current blanketexcept Exception.This is a breaking API change, so it should land with the next breaking-version bump. Deferred from #117 to keep that PR behavior-compatible. Related TODOs already exist in
fastapi_gcp_tasks/scheduler.pyandasync_scheduler.py.