queue: proper error handling