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: improve error handling in mikrotik/resourceRead() functions #66

Conversation

maksym-nazarenko
Copy link
Collaborator

@maksym-nazarenko maksym-nazarenko commented Jun 3, 2022

fixes #63, fixes #65

Now instead of panic the output will look like:

mikrotik_pool.pool: Refreshing state... [id=*1]
mikrotik_script.bar: Refreshing state... [id=my_script]
╷
│ Error: from RouterOS device: invalid user name or password (6)
│ 
│   with mikrotik_pool.pool,
│   on main.tf line 16, in resource "mikrotik_pool" "pool":
│   16: resource "mikrotik_pool" "pool" {
│ 
╵
╷
│ Error: from RouterOS device: invalid user name or password (6)
│ 
│   with mikrotik_script.bar,
│   on main.tf line 22, in resource "mikrotik_script" "bar":
│   22: resource "mikrotik_script" "bar" {

@ddelnano
Copy link
Owner

ddelnano commented Jun 6, 2022

Wow there were many inconsistencies 😬. Thanks for fixing this and I look forward to preventing new occurrences of these issues once #47 is complete.

@ddelnano ddelnano merged commit 66efed6 into ddelnano:master Jun 6, 2022
@maksym-nazarenko maksym-nazarenko deleted the fix/error-handling-in-resourceRead-functions branch September 19, 2023 18:51
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.

Error handling should be reviewed in resourceXXXRead() functions Plugin crashes with wrong credentials
2 participants