Changing IG password crashes entire site

Created on 5 February 2024, 11 months ago
Updated 11 June 2024, 6 months ago

Problem/Motivation

We just had an entire production site taken down by a password change. Seems a bit over the top.

Reported error:

GuzzleHttp\Exception\ClientException: Client error: `GET https://graph.instagram.com/me/media?fields=id%2Cmedia_type%2Cmedia_url%2Cthumbnail_url%2Ctimestamp%2Cpermalink%2Ccaption&access_token=<scrubbed>&limit=` resulted in a `400 Bad Request` response: {"error":{"message":"Error validating access token: The session has been invalidated because the user changed their pass (truncated...) in GuzzleHttp\Exception\RequestException::create() (line 113 of /var/www/html/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php).

I believe this is coming from FbInstagramAccess::getClientToken ln 117

Steps to reproduce

Install Instagram Lite
Configure module
Place block
Update IG password
Note "unexpected error" WSOD

Proposed resolution

1. Wrap offending call in a try catch block
1. Ignore following logic if response threw an exception
1. Continue displaying old content until the account is updated

Remaining tasks

[] Review/test

User interface changes

N/A

API changes

Updated FbInstagramAccess::getClientToken to catch and log exceptions

Data model changes

N/A

🐛 Bug report
Status

Needs review

Version

2.0

Component

Code

Created by

🇨🇦Canada cchiste

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024