error handling on the queue callback function