Use correct function ID in error path