Commit 509a5110 authored by 刘小敏's avatar 刘小敏

3D试戴 调试7

parent 4a2bf5aa
...@@ -644,7 +644,7 @@ if (!function_exists('format_log_error_custom_name')) { ...@@ -644,7 +644,7 @@ if (!function_exists('format_log_error_custom_name')) {
{ {
$logInfo = [ $logInfo = [
"========== $name LOG INFO BEGIN ==========", "========== $name LOG INFO BEGIN ==========",
'[ Message ] ' . var_export('[' . $error->getCode() . ']getMessage:' . $error->getMessage() . ' fullmess:' . $message, true), '[ Message ] ' . var_export('[' . $error->getCode() . '] getMessage:' . $error->getMessage() . ' fullMessage:' . $message, true),
'[ File ] ' . var_export($error->getFile() . ':' . $error->getLine(), true), '[ File ] ' . var_export($error->getFile() . ':' . $error->getLine(), true),
'[ Trace ] ' . var_export($error->getTraceAsString(), true), '[ Trace ] ' . var_export($error->getTraceAsString(), true),
"============================================= $name LOG INFO ENDED ==========", "============================================= $name LOG INFO ENDED ==========",
......
...@@ -221,17 +221,19 @@ class Ai ...@@ -221,17 +221,19 @@ class Ai
} }
// 记录完整错误 // 记录完整错误
format_log_error_custom_name($e, '[AI生成图片接口异常]', $fullMessage, 'gen_ai'); format_log_error_custom_name($e, '[AI生成图片接口异常]', $body, 'gen_ai');
} catch (\Exception $jsonE) { } catch (\Exception $jsonE) {
// 非JSON响应 // 非JSON响应
format_log_error_custom_name($e, '[AI生成图片接口异常]', $e->getMessage(), 'gen_ai'); format_log_error_custom_name($e, '[AI生成图片接口异常]', $jsonE->getMessage(), 'gen_ai');
} }
// $message = $data ? ($data['msg'] ?? '') : $e->getMessage(); // $message = $data ? ($data['msg'] ?? '') : $e->getMessage();
// format_log_error_custom_name($e, '[AI生成图片接口异常]'.' user_id:'. $userId , $message , 'gen_ai'); // format_log_error_custom_name($e, '[AI生成图片接口异常]'.' user_id:'. $userId , $message , 'gen_ai');
} catch (\Exception $e) { } catch (\Exception $e) {
format_log_error_custom_name($e, '[AI生成图片接口异常]','用户ID:'. $userId . ' response_format'. $response_format , 'gen_ai' ); $response = $e->getResponse();
$body = (string)$response->getData();
format_log_error_custom_name($e, '[AI生成图片接口异常]','用户ID:'. $userId . ' response_format'. $response_format.' 全错误信息:'.$body, 'gen_ai' );
return [ return [
'code' => 0 , 'code' => 0 ,
'msg' => '图片生成失败' 'msg' => '图片生成失败'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment