shouldStopSync determines whether a sync process should be stopped or not.
(err error)
| 589 | |
| 590 | // shouldStopSync determines whether a sync process should be stopped or not. |
| 591 | func (s Sync) shouldStopSync(err error) bool { |
| 592 | if err == storage.ErrNoObjectFound { |
| 593 | return false |
| 594 | } |
| 595 | if awsErr, ok := err.(awserr.Error); ok { |
| 596 | switch awsErr.Code() { |
| 597 | case "AccessDenied", "NoSuchBucket": |
| 598 | return true |
| 599 | } |
| 600 | } |
| 601 | return s.exitOnError |
| 602 | } |
no outgoing calls
no test coverage detected