wenminjie
2026-08-06 02c7bf03fa071325c201d29353330152d35ac71a
talent-card-server/src/main/java/com/talentcard/server/config/DependentCardApplyAdminExceptionHandler.java
@@ -25,16 +25,16 @@
    @ExceptionHandler({MethodArgumentNotValidException.class, BindException.class,
            ConstraintViolationException.class, HttpMessageNotReadableException.class})
    public ResponseEntity<ApiResponse<Void>> handleRequestException(Exception exception) {
        return error("\u5ba1\u6838\u53c2\u6570\u4e0d\u6b63\u786e");
        return error("审核参数不正确");
    }
    @ExceptionHandler(Exception.class)
    public ResponseEntity<ApiResponse<Void>> handleException(Exception exception) {
        return error("\u5bb6\u5c5e\u9644\u5c5e\u5361\u7533\u8bf7\u5904\u7406\u5931\u8d25");
        return error("家属附属卡申请处理失败");
    }
    private ResponseEntity<ApiResponse<Void>> error(String message) {
        String fallback = "\u5bb6\u5c5e\u9644\u5c5e\u5361\u7533\u8bf7\u5904\u7406\u5931\u8d25";
        String fallback = "家属附属卡申请处理失败";
        String safeMessage = message == null || message.isBlank() ? fallback : message;
        return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR)
                .body(ApiResponse.failure(500, safeMessage));