add a error code when failed to get lock