作者 赵彬吉

update

@@ -55,10 +55,10 @@ class WorkchatMessageSend extends Command @@ -55,10 +55,10 @@ class WorkchatMessageSend extends Command
55 $task->status = MessagePush::STATUS_ERROR; 55 $task->status = MessagePush::STATUS_ERROR;
56 $task->remark = '请求超时'; 56 $task->remark = '请求超时';
57 } 57 }
58 - }catch (\Exception $e){  
59 - $this->output('推送消息' . $task->id . '失败:' . $e->getMessage()); 58 + } catch (\Exception $e) {
  59 + $this->output('推送消息' . $task->id . '失败:' . $e->getLine() . ' - ' . $e->getMessage());
60 $task->status = MessagePush::STATUS_ERROR; 60 $task->status = MessagePush::STATUS_ERROR;
61 - $task->remark = mb_substr($e->getMessage(), 0 , 200); 61 + $task->remark = mb_substr($e->getMessage(), 0, 200);
62 } 62 }
63 $task->save(); 63 $task->save();
64 } 64 }
@@ -191,7 +191,7 @@ class ProjectAssociationServices extends BaseService @@ -191,7 +191,7 @@ class ProjectAssociationServices extends BaseService
191 $url = 'https://hub.ai.cc/api/globalso_ai_customer_service/send_msg'; 191 $url = 'https://hub.ai.cc/api/globalso_ai_customer_service/send_msg';
192 $result = Http::withoutVerifying()->withOptions(['proxy' => env('CURL_PROXY')])->timeout(30)->post($url, $param)->json(); 192 $result = Http::withoutVerifying()->withOptions(['proxy' => env('CURL_PROXY')])->timeout(30)->post($url, $param)->json();
193 if(empty($result) || $result['status'] != 200){ 193 if(empty($result) || $result['status'] != 200){
194 - throw new \Exception($result['message'] ?? ''); 194 + throw new \Exception(json_encode($result));
195 } 195 }
196 return true; 196 return true;
197 } 197 }