mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-10 08:16:15 +02:00
Merge pull request #1655 from copumpkin/patch-1
Don't freak out if we get a 403 from S3
This commit is contained in:
commit
4070264613
1 changed files with 2 additions and 2 deletions
|
@ -241,8 +241,8 @@ struct S3BinaryCacheStoreImpl : public S3BinaryCacheStore
|
||||||
auto & error = res.GetError();
|
auto & error = res.GetError();
|
||||||
if (error.GetErrorType() == Aws::S3::S3Errors::RESOURCE_NOT_FOUND
|
if (error.GetErrorType() == Aws::S3::S3Errors::RESOURCE_NOT_FOUND
|
||||||
|| error.GetErrorType() == Aws::S3::S3Errors::NO_SUCH_KEY
|
|| error.GetErrorType() == Aws::S3::S3Errors::NO_SUCH_KEY
|
||||||
|| (error.GetErrorType() == Aws::S3::S3Errors::UNKNOWN // FIXME
|
// If bucket listing is disabled, 404s turn into 403s
|
||||||
&& error.GetMessage().find("404") != std::string::npos))
|
|| error.GetErrorType() == Aws::S3::S3Errors::ACCESS_DENIED)
|
||||||
return false;
|
return false;
|
||||||
throw Error(format("AWS error fetching '%s': %s") % path % error.GetMessage());
|
throw Error(format("AWS error fetching '%s': %s") % path % error.GetMessage());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue