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
I am using Tesla to reach many servers some of which I expect to be down. My Tesla related code is generated by swagger codegen. I was expecting from the timeout middleware to return some sort of error such as {:error, :unavailable} or {:error, :timeout} or something similar. Instead, the calling process gets a kill signal which makes it very annoying to work around (especially so when generated from swagger).
The Erlang philosophy is "let it crash" not "make it crash". The middleware needs to let the caller decide whether he should crash or not. Typically you want to handle expected cases (that includes expected errors) and to let it crash when something unexpected happens.
I will submit a PR later. How far back does Tesla support Elixir? Is supporting Elixir >= 1.3 enough?
The text was updated successfully, but these errors were encountered:
I am using Tesla to reach many servers some of which I expect to be down. My Tesla related code is generated by swagger codegen. I was expecting from the timeout middleware to return some sort of error such as {:error, :unavailable} or {:error, :timeout} or something similar. Instead, the calling process gets a kill signal which makes it very annoying to work around (especially so when generated from swagger).
The Erlang philosophy is "let it crash" not "make it crash". The middleware needs to let the caller decide whether he should crash or not. Typically you want to handle expected cases (that includes expected errors) and to let it crash when something unexpected happens.
I will submit a PR later. How far back does Tesla support Elixir? Is supporting Elixir >= 1.3 enough?
The text was updated successfully, but these errors were encountered: