Replies: 1 comment
-
ref #483 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi there 👋.
First of all many thanks for a great library.
I like to have a common response handler that does the response status check and unwraps the body.
It can be easily achieved by implementing a middleware:
Obviously, it breaks the middleware contract since it returns
{:ok, any()}
instead of{:ok, %Tesla.Env{}}
. But as long as you keep such middleware at the tail of the response handlers chain it works perfectly fine and I'm okay with it.The problem is that Dyalizer is not okay with it.
Tesla already supports
docs: false
option. Maybe we could addspecs: false
option to tellTesla.Builder
to not inject@spec
s forget
,post
etc. functions?Or maybe someone has a better idea of how to solve it?
Beta Was this translation helpful? Give feedback.
All reactions