From 62526015ac2055d9e6db0593adc9f3d64641df54 Mon Sep 17 00:00:00 2001 From: guohelu <19503896967@163.com> Date: Tue, 7 Jan 2025 11:15:57 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E5=AF=BC=E5=85=A5?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E4=BF=A1=E6=81=AF=E6=8F=90=E7=A4=BA=20--stor?= =?UTF-8?q?y=3D121224121?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gcloud/apigw/views/copy_template_across_project.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gcloud/apigw/views/copy_template_across_project.py b/gcloud/apigw/views/copy_template_across_project.py index 730358da5..27b3a97ed 100644 --- a/gcloud/apigw/views/copy_template_across_project.py +++ b/gcloud/apigw/views/copy_template_across_project.py @@ -15,6 +15,7 @@ from blueapps.account.decorators import login_exempt from django.views.decorators.csrf import csrf_exempt from django.views.decorators.http import require_POST +from pipeline.exceptions import SubprocessExpiredError from gcloud import err_code from gcloud.apigw.decorators import ( @@ -69,6 +70,13 @@ def copy_template_across_project(request, project_id): project_id=new_project_id, operator=request.user.username, ) + except SubprocessExpiredError as e: + logger.exception("Process template export failed: {}".format(e)) + return { + "result": False, + "message": "Process template export failed: {}".format(e), + "code": err_code.UNKNOWN_ERROR.code, + } except Exception as e: logger.exception("The template fails to be copied across project: {}".format(e)) return {