@@ -66,13 +66,22 @@ export class ContentsService {
6666
6767 categoryId = categoryId ? categoryId : parentId ;
6868
69- const {
70- title : linkTitle ,
71- siteName,
72- description,
73- coverImg,
74- } = await getLinkInfo ( link ) ;
75- title = title ? title : linkTitle ;
69+ let siteName : string | undefined ;
70+ let description : string | undefined ;
71+ let coverImg : string | undefined ;
72+
73+ try {
74+ const {
75+ title : linkTitle ,
76+ siteName : _siteName ,
77+ description : _description ,
78+ coverImg : _coverImg ,
79+ } = await getLinkInfo ( link ) ;
80+ title = title ? title : linkTitle ;
81+ siteName = _siteName ;
82+ description = _description ;
83+ coverImg = _coverImg ;
84+ } catch ( e ) { }
7685
7786 const content = new Content ( ) ;
7887
@@ -366,11 +375,11 @@ export class ContentsService {
366375 ) ;
367376
368377 // 크롤링 후 처리
369- let summary : string = '' ;
378+ let summary = '' ;
370379 if ( ! document ) {
371380 throw new BadRequestException ( 'Document not found.' ) ;
372381 } else if ( document . length > 1900 ) {
373- let sliceIndex : number = 0 ;
382+ let sliceIndex = 0 ;
374383 for ( let i = 0 ; i < Math . ceil ( document . length / 1900 ) ; i ++ ) {
375384 const slicedSummary = await this . summaryService . summaryContent ( {
376385 title : content ?. title ,
@@ -403,10 +412,10 @@ export class ContentsService {
403412 content : document ,
404413 } : SummarizeContentBodyDto ) : Promise < SummarizeContentOutput > {
405414 try {
406- let summary : string = '' ;
415+ let summary = '' ;
407416
408417 if ( document . length > 1900 ) {
409- let sliceIndex : number = 0 ;
418+ let sliceIndex = 0 ;
410419 for ( let i = 0 ; i < Math . ceil ( document . length / 1900 ) ; i ++ ) {
411420 const slicedSummary = await this . summaryService . summaryContent ( {
412421 title,
0 commit comments