You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be cool, when DataLoader.download_new would not crash on timeouts/etc.
A Logger.warn would be nicer, instead of getting a alarm from Sentry :(
# instead of this what will crash unnecessarily
{:ok, 200, headers, client_ref} = :hackney.get(url, [], "", [follow_redirect: true])
# refactor the code like this:
case :hackney.get(url, [], "", [follow_redirect: true]) do
{:ok, 200, headers, client_ref} ->
# rest of code
error ->
Logger.warn("Fetching #{inspect url} failed because of error #{inspect error}")
error
end
It would be cool, when
DataLoader.download_new
would not crash on timeouts/etc.A
Logger.warn
would be nicer, instead of getting a alarm from Sentry :(https://github.com/lau/tzdata/blob/master/lib/tzdata/data_loader.ex#L10
Anybody willing to work on this?
The text was updated successfully, but these errors were encountered: