Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Throw AuthException when profile data fetch fails due to checkpoint #378

Merged
merged 1 commit into from
Apr 19, 2024
Merged

Throw AuthException when profile data fetch fails due to checkpoint #378

merged 1 commit into from
Apr 19, 2024

Conversation

cookieguru
Copy link
Contributor

Q A
Branch? master
Bug fix? no
New feature? yes
Issue? N/A

Sometimes Instagram throws up a checkpoint if it feels like media is being downloaded too quickly. Here's what the actual exception looks like:

Instagram\Exception\InstagramFetchException Object
(
    [message:protected] => Error: Client error: `GET https://i.instagram.com/api/v1/users/web_profile_info/?username=pgrimaud` resulted in a `400 Bad Request` response:
{"message":"checkpoint_required","checkpoint_url":"https://i.instagram.com/challenge/?next=/api/v1/users/web_profile_inf (truncated...)

    [string:Exception:private] => 
    [code:protected] => 0
    [[file:protected](file:///protected)] => /path/to/vendor/pgrimaud/instagram-user-feed/src/Instagram/Transport/JsonProfileDataFeedV2.php
    [line:protected] => 28
    [trace:Exception:private] => (not shown in this issue)

Note we cannot see the entire body because the code that generates the exception trims the body to 120 chars

@pgrimaud pgrimaud merged commit f3aa629 into pgrimaud:master Apr 19, 2024
0 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants