tofuutils / tenv

OpenTofu / Terraform / Terragrunt and Atmos version manager
https://tofuutils.github.io/tenv/
Apache License 2.0
695 stars 34 forks source link

Improve error messages in case of unexpected response from the API #236

Open corrieriluca opened 2 months ago

corrieriluca commented 2 months ago

Is your feature request related to a problem? Please describe. When a problem happens on the API side (network error, rate limiting, version not found...) a generic message unexpected value returned by API is displayed by tenv which does not indicate the nature of the problem and could make the investigation more complicated.

Describe the solution you'd like Clear error messages, for example:

Describe alternatives you've considered As a quick first attempt this kind of errors could be displayed only in verbose mode before implementing human-readable error messages.

dvaumoron commented 2 months ago

Good idea, I will take a look on what could be done

Nmishin commented 2 months ago

@dvaumoron Denis, you don't mind if I will check it? I've already started working on it a bit, and plan to proceed on weekends :)