From 841467a4552b00ca30374a3917ac68598aa3d601 Mon Sep 17 00:00:00 2001 From: Marcel Jankrift Date: Sun, 2 May 2021 10:38:55 +0200 Subject: [PATCH] detect rate limit and print better output (#15) --- deleter.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deleter.go b/deleter.go index 430b49e..747c6e3 100755 --- a/deleter.go +++ b/deleter.go @@ -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 }