Skip to content

fix: database slowdown error message check#1122

Open
ferhatelmas wants to merge 1 commit into
masterfrom
ferhat/db-slowdown
Open

fix: database slowdown error message check#1122
ferhatelmas wants to merge 1 commit into
masterfrom
ferhat/db-slowdown

Conversation

@ferhatelmas
Copy link
Copy Markdown
Member

What kind of change does this PR introduce?

Bug fix

What is the current behavior?

Cached error message is slightly changing and not matching, returning 500.

What is the new behavior?

Match by cached error without its message.

Additional context

Example: server login has been failing, cached error: connect failed (server_login_retry)

Copilot AI review requested due to automatic review settings May 21, 2026 12:02
@ferhatelmas ferhatelmas requested a review from a team as a code owner May 21, 2026 12:02
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adjusts the database “slow down / too many connections” detection so that transient Supavisor “cached error” messages don’t cause mismatches that fall through to a 500 response.

Changes:

  • Broadens isDatabaseSlowDownError matching from specific cached-error strings to a stable cached-error prefix.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/internal/errors/database-error.ts
@coveralls
Copy link
Copy Markdown

coveralls commented May 21, 2026

Coverage Report for CI Build 26225007131

Coverage remained the same at 75.184%

Details

  • Coverage remained the same as the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 10356
Covered Lines: 8196
Line Coverage: 79.14%
Relevant Branches: 5988
Covered Branches: 4092
Branch Coverage: 68.34%
Branches in Coverage %: Yes
Coverage Strength: 370.09 hits per line

💛 - Coveralls

Signed-off-by: ferhat elmas <elmas.ferhat@gmail.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

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.

3 participants