Skip to content
This repository has been archived by the owner on Jan 14, 2025. It is now read-only.

Commit

Permalink
detect rate limit and print better output (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelja committed May 2, 2021
1 parent e134f76 commit 841467a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions deleter.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ func retrieveRequestString(resp *http.Response, err error) string {
fmt.Println("error during http request")
}
strBody := string(body)
if strings.Contains(strBody, "You can try again later") {
panic("ratelimited")
if (strings.Contains(strBody, "You can try again later") || strings.Contains(strBody, "temporarily blocked")) {
panic("ratelimited, please open https://mbasic.facebook.com and navigate to your activity log to see more information.")
}
return strBody
}
Expand Down

0 comments on commit 841467a

Please sign in to comment.