Receive timeout results in MatchError
Closed this issue · 0 comments
emoragaf commented
Environment
- Elixir version (elixir -v): 1.13.4
- Waffle version (mix deps): 1.1.6
- Waffle dependencies when applicable (mix deps):
- Operating system: Linux, MacOS
Expected behavior
When downloading a remote file, in case of reaching the receive timeout I would expect to receive an error tuple along the lines of {:error, :recv_timeout}
Actual behavior
Receive timeout is not handled by Waffle.File
causing a MatchError
[error] ** (MatchError) no match of right hand side value: {:error, :timeout}
(waffle 1.1.6) lib/waffle/file.ex:187: Waffle.File.request/4
(waffle 1.1.6) lib/waffle/file.ex:148: Waffle.File.save_temp_file/3
(waffle 1.1.6) lib/waffle/file.ex:140: Waffle.File.save_file/3
(waffle 1.1.6) lib/waffle/file.ex:20: Waffle.File.new/2
(waffle 1.1.6) lib/waffle/actions/store.ex:54: Waffle.Actions.Store.store/2