diff --git a/crmeb/app/adminapi/AdminApiExceptionHandle.php b/crmeb/app/adminapi/AdminApiExceptionHandle.php index 91d75b43a..075813bf1 100644 --- a/crmeb/app/adminapi/AdminApiExceptionHandle.php +++ b/crmeb/app/adminapi/AdminApiExceptionHandle.php @@ -84,7 +84,7 @@ class AdminApiExceptionHandle extends Handle 'trace' => $e->getTrace(), 'previous' => $e->getPrevious(), ] : []; - $message = Env::get('app_debug', false) ? $e->getMessage() : '很抱歉,系统开小差了'; + $message = $e->getMessage(); // 添加自定义异常处理机制 if ($e instanceof AuthException || $e instanceof AdminException || $e instanceof ApiException || $e instanceof ValidateException) { return app('json')->make($e->getCode() ?: 400, $message, $massageData); diff --git a/crmeb/app/api/ApiExceptionHandle.php b/crmeb/app/api/ApiExceptionHandle.php index 2326d29ac..094ea1766 100644 --- a/crmeb/app/api/ApiExceptionHandle.php +++ b/crmeb/app/api/ApiExceptionHandle.php @@ -85,7 +85,7 @@ class ApiExceptionHandle extends Handle 'trace' => $e->getTrace(), 'previous' => $e->getPrevious(), ] : []; - $message = Env::get('app_debug', false) ? $e->getMessage() : '很抱歉,系统开小差了'; + $message = $e->getMessage(); // 添加自定义异常处理机制 if ($e instanceof ApiStatusException) { return app('json')->status($e->getApiStatus(), $message, $e->getApiData()); diff --git a/crmeb/app/kefuapi/KefuApiExceptionHandle.php b/crmeb/app/kefuapi/KefuApiExceptionHandle.php index 0d130193f..e2957c43a 100644 --- a/crmeb/app/kefuapi/KefuApiExceptionHandle.php +++ b/crmeb/app/kefuapi/KefuApiExceptionHandle.php @@ -84,7 +84,7 @@ class KefuApiExceptionHandle extends Handle 'trace' => $e->getTrace(), 'previous' => $e->getPrevious(), ] : []; - $message = Env::get('app_debug', false) ? $e->getMessage() : '很抱歉,系统开小差了'; + $message = $e->getMessage(); // 添加自定义异常处理机制 if ($e instanceof AuthException || $e instanceof AdminException || $e instanceof ApiException || $e instanceof ValidateException) { return app('json')->make($e->getCode() ?: 400, $message, $massageData); diff --git a/crmeb/app/outapi/OutApiExceptionHandle.php b/crmeb/app/outapi/OutApiExceptionHandle.php index 6549daf9a..34a78ebb3 100644 --- a/crmeb/app/outapi/OutApiExceptionHandle.php +++ b/crmeb/app/outapi/OutApiExceptionHandle.php @@ -84,7 +84,7 @@ class OutApiExceptionHandle extends Handle 'trace' => $e->getTrace(), 'previous' => $e->getPrevious(), ] : []; - $message = Env::get('app_debug', false) ? $e->getMessage() : '很抱歉,系统开小差了'; + $message = $e->getMessage(); // 添加自定义异常处理机制 if ($e instanceof AuthException || $e instanceof AdminException || $e instanceof ApiException || $e instanceof ValidateException) { return app('json')->make($e->getCode() ?: 400, $message, $massageData);