Problem/Motivation
When the Drupal cron runner is executing a queue, and if a queue worker throws a \Drupal\Core\Queue\SuspendQueueException, a RfcLogLevel::ERROR level log and backtrace are logged, and potentially recorded to a database of some kind. Throwing a SuspendQueueException exception doesnt needed to be treated so severely. For example in the normal course of business I exceed the quotas of an external API, I need to suspend the queue temporarily. This does not warrant logging an 'error' and backtrace.
Proposed resolution
Log a less severe log entry.
Dont log the exception and backtrace.
Remaining tasks
API changes
Data model changes
Original report
In the related issue you can requeue a single item back to the queue.
There already is functionality to suspend the whole queue by throwing a SuspendQueueException. Downside of this is that a watchdog is written. In my case this is not needed. I just want to stop processing the queue in the current cron-run and try again in the next one.
I'm not sure how to go about fixing this. For now, I've made a custom patch which adds a boolean "preventWatchdog" to the SuspendQueueException and in Cron.php, this is checked. I'll add the patch in the first comment.
Side note: watchdogs/exceptions/etc during cron-runs are being emailed, which results in quite some emails which are perfectly fine. I'd rather have an email when there really is a problem.