twitterchiver/related_fetcher: treat 403 as deleted as well
This commit is contained in:
parent
e6180a6850
commit
cab1df2966
1 changed files with 2 additions and 2 deletions
|
@ -237,8 +237,8 @@ func mediaFetchTick(ctx context.Context, cfg WorkerConfig) error {
|
||||||
switch resp.StatusCode {
|
switch resp.StatusCode {
|
||||||
case http.StatusOK:
|
case http.StatusOK:
|
||||||
break // This is what we expect.
|
break // This is what we expect.
|
||||||
case http.StatusNotFound:
|
case http.StatusNotFound, http.StatusForbidden:
|
||||||
log.Printf("[%v:%d:%v] got a 404; marking as successful since this has probably been deleted.", cfg.Name, t.ID, u)
|
log.Printf("[%v:%d:%v] got a %d; marking as successful since this has probably been deleted.", cfg.Name, t.ID, u, resp.StatusCode)
|
||||||
return nil
|
return nil
|
||||||
default:
|
default:
|
||||||
return fmt.Errorf("HTTP status %d - %v", resp.StatusCode, resp.Status)
|
return fmt.Errorf("HTTP status %d - %v", resp.StatusCode, resp.Status)
|
||||||
|
|
Loading…
Reference in a new issue