Skip to content

Commit c4a361b

Browse files
authored
Merge pull request #366 from Quickchive/feat/split-og-function-try-catch
feat: split try/catch block
2 parents 51dbd57 + 08fe1c0 commit c4a361b

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/contents/util/content.util.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@ class OGCrawler {
3232
}
3333

3434
public async fetch(url: string): Promise<any> {
35-
try {
36-
// YouTube 비디오 ID 추출
37-
const videoId = this.extractVideoId(url);
38-
if (videoId) {
39-
return await this.fetchYouTubeData(videoId);
40-
}
35+
// YouTube 비디오 ID 추출
36+
const videoId = this.extractVideoId(url);
37+
if (videoId) {
38+
return await this.fetchYouTubeData(videoId);
39+
}
4140

41+
try {
4242
const response: AxiosResponse = await axios({
4343
method: 'get',
4444
url,

0 commit comments

Comments
 (0)