We were checking for the wrong error kind when pulling messages from the database, which resulted in the code not retrying to pull the message, giving flaky tests / race condition (that's present in production as well)