1
This commit is contained in:
@@ -374,7 +374,8 @@ def _step_to_out(step: ModuleGenerationStep) -> HotOpeningStepOut:
|
|||||||
if error_message:
|
if error_message:
|
||||||
from app.services.error_codes import ARK_ERRORS
|
from app.services.error_codes import ARK_ERRORS
|
||||||
import re
|
import re
|
||||||
match = re.search(r"code='([^']+)'", error_message)
|
# 兼容两种格式: code='xxx' 或 'code': 'xxx'
|
||||||
|
match = re.search(r"""code['"]?\s*[:=]\s*['"]([^'"]+)['"]""", error_message)
|
||||||
if match:
|
if match:
|
||||||
code = match.group(1)
|
code = match.group(1)
|
||||||
if code in ARK_ERRORS:
|
if code in ARK_ERRORS:
|
||||||
|
|||||||
@@ -385,7 +385,8 @@ def _step_to_out(step: ModuleGenerationStep) -> ShotReplicateStepOut:
|
|||||||
if error_message:
|
if error_message:
|
||||||
from app.services.error_codes import ARK_ERRORS
|
from app.services.error_codes import ARK_ERRORS
|
||||||
import re
|
import re
|
||||||
match = re.search(r"code='([^']+)'", error_message)
|
# 兼容两种格式: code='xxx' 或 'code': 'xxx'
|
||||||
|
match = re.search(r"""code['"]?\s*[:=]\s*['"]([^'"]+)['"]""", error_message)
|
||||||
if match:
|
if match:
|
||||||
code = match.group(1)
|
code = match.group(1)
|
||||||
if code in ARK_ERRORS:
|
if code in ARK_ERRORS:
|
||||||
|
|||||||
Reference in New Issue
Block a user