Skip to content

Commit

Permalink
fix: 修改导入错误信息提示 --story=121224121
Browse files Browse the repository at this point in the history
  • Loading branch information
guohelu committed Jan 7, 2025
1 parent 206360c commit 78dfe19
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions gcloud/apigw/views/copy_template_across_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 78dfe19

Please sign in to comment.