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

Provide specific errors for database connection failures from the webserver #563

Closed
ThomasLaPiana opened this issue May 4, 2022 · 3 comments
Assignees
Milestone

Comments

@ThomasLaPiana
Copy link
Contributor

Is your feature request related to a specific problem?

If the webserver fails to connect to the database, a generic "database unreachable" error is given

Describe the solution you'd like

We should let the user know exactly which part of their configuration is incorrect (i.e. user/password, vs. completely unreachable)

Describe alternatives you've considered, if any

A description of any alternative solutions or features you've considered.

Additional context

should be done after #562

@allisonking
Copy link
Contributor

After #649, the errors sqlalchemy raises by default seem pretty decent, for example:

  • Wrong username/password for the db
Unable to reach the database: sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) FATAL:  password authentication failed for user "postgressss"
  • Wrong port
fides-fidesctl-1  | 2022-05-17 20:37:37.249 [ERROR] (database:get_db_health:135): Unable to reach the database: sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) could not connect to server: Connection refused
fides-fidesctl-1  | 	Is the server running on host "fidesctl-db" (172.23.0.2) and accepting
fides-fidesctl-1  | 	TCP/IP connections on port 5431?
fides-fidesctl-1  | 
fides-fidesctl-1  | (Background on this error at: https://sqlalche.me/e/14/e3q8)
  • Can't reach db host
fides-fidesctl-1  | 2022-05-17 17:27:55.022 [ERROR] (main:configure_db:53): Unable to configure database: sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) could not translate host name "fidesctl-db" to address: Name or service not known
fides-fidesctl-1  | 
fides-fidesctl-1  | (Background on this error at: http://sqlalche.me/e/14/e3q8)

Do you think that's enough, or is there more work to do for this ticket?

@ThomasLaPiana
Copy link
Contributor Author

those 3 seem great! we want to make sure that its enough info for an end-user to reasonably debug any connection issue, and these three feel like they'd cover the vast majority of those issues

@allisonking
Copy link
Contributor

Closed as a side effect of #649

ThomasLaPiana pushed a commit that referenced this issue Aug 17, 2022
* Get initial page setup and fix some eslints

* Finish majority of UI styling

* Finished clipboard button

* refactor page component

* Add prettier to project

* Format project with prettier

* Add format command

* rename files

* Add icons and lines

* WIP event details table

* Run prettier on codbase 😭

* Add finishing touches for latest mock ups

* Fix frontend lint error

* Update Request type to use rule action types

* Fix typing issue

* Fix lint issues

* Fix last lint issue 🤞

* Update changelog

* Run prettier formatter

* Remove unused clipboard icon

* Remove comment

* Remove ts-ignore

* Fix changelog file
ThomasLaPiana pushed a commit that referenced this issue Sep 26, 2022
* Get initial page setup and fix some eslints

* Finish majority of UI styling

* Finished clipboard button

* refactor page component

* Add prettier to project

* Format project with prettier

* Add format command

* rename files

* Add icons and lines

* WIP event details table

* Run prettier on codbase 😭

* Add finishing touches for latest mock ups

* Fix frontend lint error

* Update Request type to use rule action types

* Fix typing issue

* Fix lint issues

* Fix last lint issue 🤞

* Update changelog

* Run prettier formatter

* Remove unused clipboard icon

* Remove comment

* Remove ts-ignore

* Fix changelog file
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

2 participants