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

Get a specific error type for authentication failure #26

Open
EliRibble opened this issue Sep 20, 2024 · 1 comment
Open

Get a specific error type for authentication failure #26

EliRibble opened this issue Sep 20, 2024 · 1 comment

Comments

@EliRibble
Copy link

As a client of this library I'd like to do different behavior rather than just print out the nested error messages. For example, right now if I just do:

          c, err := routeros.DialTimeout(*address, *username, *password, *timeout)                                                                                                        
          if err != nil {                                                                                                                                                                 
                  fatal(log, err)                                                                                                                                                         
          }                                                                                                                                                                               

The output looks like:

could not login: from RouterOS device: invalid user name or password (6); close %!w()

Instead I'd like to detect that it was an authentication failure, and tell my user their credentials are bad.

@EliRibble
Copy link
Author

#27 for a solution

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

No branches or pull requests

1 participant