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: K8s.Client.run/2 spec missing a possible error #189

Merged
merged 1 commit into from
Oct 27, 2022

Conversation

icehaunter
Copy link
Contributor

K8s.Client.run/2 (actually t:K8s.Client.Runner.Base.error_t/0) spec was missing t:K8s.Client.APIError.t/0 from possible error types, making code like this trigger Dialyzer warnings:

case K8s.Client.run(conn, operation) do
  {:ok, result} -> {:ok, result}
  {:error, %K8s.Client.APIError{} = error} -> # ... This case is marked as "can never match the type"
end

I'm aware that this type may actually be missing from the return union based on the chosen HTTP provider (this error is from K8s.Client.HTTPProvider.handle_kubernetes_error/1), but it is present when you're using the defaults and it would be nice to have that reflected without suppressing Dialyzer warnings at the point of use.

Requirements for all pull requests

  • Entry in CHANGELOG.md was created

@mruoss
Copy link
Collaborator

mruoss commented Oct 27, 2022

Thanks!

@mruoss mruoss merged commit 3a33c41 into coryodaniel:develop Oct 27, 2022
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