From 129b21b46beb28a435ff7d021aeb234d4ca97e29 Mon Sep 17 00:00:00 2001 From: Nevo David Date: Thu, 26 Sep 2024 16:49:45 +0700 Subject: [PATCH] feat: check tiktok error --- .../src/integrations/social/tiktok.provider.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/libraries/nestjs-libraries/src/integrations/social/tiktok.provider.ts b/libraries/nestjs-libraries/src/integrations/social/tiktok.provider.ts index 15d3b766..92659c4b 100644 --- a/libraries/nestjs-libraries/src/integrations/social/tiktok.provider.ts +++ b/libraries/nestjs-libraries/src/integrations/social/tiktok.provider.ts @@ -5,7 +5,10 @@ import { SocialProvider, } from '@gitroom/nestjs-libraries/integrations/social/social.integrations.interface'; import dayjs from 'dayjs'; -import { SocialAbstract } from '@gitroom/nestjs-libraries/integrations/social.abstract'; +import { + BadBody, + SocialAbstract, +} from '@gitroom/nestjs-libraries/integrations/social.abstract'; import { TikTokDto } from '@gitroom/nestjs-libraries/dtos/posts/providers-settings/tiktok.dto'; export class TiktokProvider extends SocialAbstract implements SocialProvider { @@ -183,7 +186,10 @@ export class TiktokProvider extends SocialAbstract implements SocialProvider { }, ]; } catch (err) { - return []; + throw new BadBody(JSON.stringify(err), { + // @ts-ignore + postDetails + }); } } }