zhongwencool / maxwell

Maxwell is an HTTP client which support for middleware and multiple adapters.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[QUESTION] HTTP method return value for errors

visciang opened this issue · comments

Just looking at the code.
Do we need the clause {:error, _} at L172 and L183?

We should have only {:error, reason, %Maxwell.Conn{}}

@visciang actually, we just had the {:error, reason} at first. Considering the error handler may need to retrieve some props from the %Maxwell.Conn{}, we added the conn to the error type.

In short, consider it as a forwards compatibility feature.