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

A better error for a wrong password #12

Open
PietrH opened this issue Feb 8, 2023 · 4 comments
Open

A better error for a wrong password #12

PietrH opened this issue Feb 8, 2023 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@PietrH
Copy link
Member

PietrH commented Feb 8, 2023

Currently if you provide the wrong password to connect_to_etn() the following error is returned:

Error: nanodbc/nanodbc.cpp:1021: 00000: [unixODBC]fe_sendauth: no password supplied
 
In addition: Warning message:
In readLines(file, skipNul = TRUE) :
 

 Error: nanodbc/nanodbc.cpp:1021: 00000: [unixODBC]fe_sendauth: no password supplied

Is there a way we can intercept this ODBC error and produce our own?

@PietrH PietrH added the enhancement New feature or request label Feb 8, 2023
@PietrH
Copy link
Member Author

PietrH commented Feb 8, 2023

Currently the client package doesn't pass along error messages, so I'm making this issue for future reference

@PietrH PietrH linked a pull request Jun 8, 2023 that will close this issue
34 tasks
@PietrH
Copy link
Member Author

PietrH commented Jun 8, 2023

The client now passes errors: inbo/etn@1c24bfc

@PietrH PietrH self-assigned this Jun 8, 2023
@PietrH
Copy link
Member Author

PietrH commented Oct 2, 2024

This error message needs to be generated on the etnservice side, specifically by connect to etn:

This line is repeated in all functions: connection <- connect_to_etn(credentials$username, credentials$password), an additional error message might be useful when either password or username is omitted, although that should never happen in etn because they are always both fetched by get_credentials()

When etnservice is used as a dependency for local database connections, this'll also insure that the error message is the same regardless if you use a local database connection or the api.

@PietrH
Copy link
Member Author

PietrH commented Jan 15, 2025

Let's add a function that the client package can use to see if the provided credentials are correct, then the client can provide an error / not cache the credentials when the wrong credentials are provided.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant