Skip to content

Commit

Permalink
修复在测试执行接口时,异常结果未被正确处理的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
javamxd committed Nov 3, 2020
1 parent 3cd78c4 commit 74d06fd
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,8 @@ private Object invokeTestRequest(ApiInfo info, MagicScriptDebugContext context,
try {
// 初始化debug操作
initializeDebug(context, request, response);
Object result = executeScript(info.getScript(), context);
response.addHeader(HEADER_RESPONSE_WITH_MAGIC_API, "true");
Object result = executeScript(info.getScript(), context);
if (context.isRunning()) {
return new JsonBodyBean<>(1000, context.getId(), resultProvider.buildResult(1000, context.getId(), result), result);
} else if (context.isException()) { //判断是否出现异常
Expand Down

0 comments on commit 74d06fd

Please sign in to comment.