Don't hold the lock on error handling