Fixes https://github.com/JuliaServices/CloudStore.jl/issues/26. The issue is that HTTP.jl doesn't consider redirect responses as errors by default (they're usually handled automatically via default redirect logic, except for 301 statuses, which means the object has moved permanently and no redirect location is known).
This PR checks for this case and throw an appropriate ArgumentError.
Fixes https://github.com/JuliaServices/CloudStore.jl/issues/26. The issue is that HTTP.jl doesn't consider redirect responses as errors by default (they're usually handled automatically via default redirect logic, except for 301 statuses, which means the object has moved permanently and no redirect location is known).
This PR checks for this case and throw an appropriate ArgumentError.