We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 991792b + 9721de2 commit be77adcCopy full SHA for be77adc
src/contents/util/content.util.ts
@@ -72,8 +72,16 @@ class OGCrawler {
72
73
return this.parse(response.data);
74
} catch (error) {
75
- if (error instanceof AxiosError && error.response?.status === 403) {
76
- throw new ForbiddenException('og 데이터를 가져올 수 없는 링크입니다.');
+ if (error instanceof AxiosError) {
+ if (
77
+ error?.response?.status === 400 ||
78
+ error.response?.status === 403 ||
79
+ error.response?.status === 404
80
+ ) {
81
+ throw new ForbiddenException(
82
+ 'og 데이터를 가져올 수 없는 링크입니다.',
83
+ );
84
+ }
85
}
86
87
throw new InternalServerErrorException('An unknown error occurred');
0 commit comments