Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: ensure adapter is set #717

Merged
merged 1 commit into from
Oct 21, 2024
Merged

fix: ensure adapter is set #717

merged 1 commit into from
Oct 21, 2024

Conversation

yordis
Copy link
Member

@yordis yordis commented Oct 21, 2024

Context

This ensures that the returned Tesla.Env includes the adapter used to make the call. This will help debug which adapter was used and also reflect what truly happened at runtime.

Extra

Before

iex(1)> Tesla.get("https://httpbin.org/get")
{:ok,
 %Tesla.Env{
   __client__: %Tesla.Client{
     adapter: nil
   }
 }}

After

iex(1)> Tesla.get("https://httpbin.org/get")
{:ok,
 %Tesla.Env{
   __client__: %Tesla.Client{
     adapter: {Tesla.Adapter.Httpc, :call, [[]]}
   }
 }}

@yordis yordis marked this pull request as ready for review October 21, 2024 02:21
@yordis yordis requested a review from teamon October 21, 2024 02:28
@yordis yordis merged commit 317a7d4 into master Oct 21, 2024
5 checks passed
@yordis yordis deleted the fix-set-adapter-to-env branch October 21, 2024 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants