(assuming that do_generate and the handle_response from your initial post are in the same module)
Dialyzer is telling you the {:error, _, _} branch in handle_response can’t be reached because create_completion’s return type matches Client.handle_response ({:ok, body()} | {:error, term()})
As shown, Client.handle_response will crash if Client.post returns {:error, _, _}, since it doesn’t have a matching clause. You’ll likely need to update:
- the definition of
resultinClient, if it doesn’t include the 3-tuple case already - the return type for
Client.handle_response, if you want to handle the 3-tuple case in the caller instead of inClient






















