We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 93708ef commit c5b8e1eCopy full SHA for c5b8e1e
lib/fog/aliyun/models/storage/files.rb
@@ -84,8 +84,17 @@ def get(key)
84
_start = (i - 1) * Excon::CHUNK_SIZE
85
_end = i * Excon::CHUNK_SIZE - 1
86
range = "#{_start}-#{_end}"
87
- data = service.get_object(object, range)
88
- chunk = data[:body]
+ begin
+ data = service.get_object(object, range)
89
+ chunk = data[:body]
90
+ rescue StandardError => error
91
+ case error.response.body
92
+ when %r{<Code>NoSuchKey</Code>},%r{<Code>SymlinkTargetNotExist</Code>}
93
+ chunk = ''
94
+ else
95
+ raise(error)
96
+ end
97
98
yield(chunk)
99
body = nil
100
end
0 commit comments