Skip to content

Reply database REPL errors to the WebSocket client#50613

Merged
gabrielcorado merged 1 commit intomasterfrom
gabrielcorado/reply-pg-repl-errors
Jan 2, 2025
Merged

Reply database REPL errors to the WebSocket client#50613
gabrielcorado merged 1 commit intomasterfrom
gabrielcorado/reply-pg-repl-errors

Conversation

@gabrielcorado
Copy link
Copy Markdown
Contributor

Relate to #50221

Currently, when there is an error on the database REPL, those errors are logged but not returned to the client. Here is an example with a connect error:

Screenshot 2024-12-30 at 13 08 13

This PR updates the database web socket handler to avoid closing the connection (and terminal stream) when there is a session error. The middleware can send the handler error to the client when the connection is opened. In addition to this change, we're updating the connect error message from PostgreSQL REPL.

With this change, errors will propagate to the client and be presented to users, for example, the connect error:

Screenshot 2024-12-30 at 13 02 56

changelog: Present connection errors to the Web UI terminal during database sessions.

Comment thread lib/web/databases.go
@gabrielcorado gabrielcorado requested a review from greedy52 January 2, 2025 15:14
@gabrielcorado gabrielcorado added this pull request to the merge queue Jan 2, 2025
Merged via the queue into master with commit b48b9a6 Jan 2, 2025
@gabrielcorado gabrielcorado deleted the gabrielcorado/reply-pg-repl-errors branch January 2, 2025 17:18
@public-teleport-github-review-bot
Copy link
Copy Markdown

@gabrielcorado See the table below for backport results.

Branch Result
branch/v17 Create PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants