service cert

This commit is contained in:
Hankin 2026-05-12 10:41:04 +08:00
parent 04a1ef93da
commit 20b28f7afb

View File

@ -3,6 +3,7 @@
namespace App\Exceptions;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
use Log;
use Throwable;
class Handler extends ExceptionHandler
@ -142,7 +143,7 @@ class Handler extends ExceptionHandler
if (config('app.debug')) {
return $e->getMessage();
}
Log::error($e->getMessage());
// 生产环境返回友好消息
return match (true) {
$e instanceof NotFoundHttpException => '资源不存在',