Skip to content

πŸ“¨ The ultimate agentic social media scheduling tool πŸ€–

fix(gmb): treat non-JSON create response as unconfirmed post

Gilad Resisi1d9650490abc
diff --git a/libraries/nestjs-libraries/src/integrations/social/gmb.provider.ts b/libraries/nestjs-libraries/src/integrations/social/gmb.provider.ts
index 40e0c21f9..6f44d3f2c 100644
--- a/libraries/nestjs-libraries/src/integrations/social/gmb.provider.ts
+++ b/libraries/nestjs-libraries/src/integrations/social/gmb.provider.ts
@@ -484,7 +484,7 @@ export class GmbProvider extends SocialAbstract implements SocialProvider {
'create local post'
);
- const postData = await response.json();
+ const postData = await response.json().catch(() => ({}));
if (postData?.state === 'REJECTED') {
throw new BadBody(