Skip to content

Add configured client copies with error callbacks - #606

Merged
dblock merged 1 commit into
slack-ruby:masterfrom
dblock:client-error-callbacks
Oct 5, 2026
Merged

dblock merged 1 commit into
slack-ruby:masterfrom
dblock:client-error-callbacks

Conversation

@dblock

@dblock dblock commented Oct 5, 2026

Copy link
Copy Markdown
Collaborator

Add client.with_error { |error| ... }, complementing the request and response observers introduced in #605.

Error observers receive Slack, transport, and translated parsing exceptions for every failed HTTP attempt, including pagination retries. After notification the same exception is re-raised with its backtrace preserved. Exceptions from request/response callbacks are excluded. If an error observer raises, that exception propagates without recursive notification. Configured copies preserve the original client and support callback chaining.

Includes README usage and regression coverage. This provides centralized access to error details discussed in #483 without changing exception messages globally.

Validation: 642 non-CLI examples pass; RuboCop reports no offenses. CLI specs remain excluded locally because an existing Bundler missing-extension warning contaminates subprocess output. Existing submodule changes are excluded.

Prepared by an AI on behalf of @dblock.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@dblock
dblock force-pushed the client-error-callbacks branch from 395f0d2 to 44b9b17 Compare October 5, 2026 12:57
@github-actions

github-actions Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

Danger Report

No issues found.

View run

@dblock
dblock merged commit 565c386 into slack-ruby:master Oct 5, 2026
10 checks passed
@coveralls

coveralls commented Oct 5, 2026 •

Copy link
Copy Markdown

Coverage Report for CI Build 37313179260

Warning

Build has drifted: This PR's base is out of sync with its target branch, so coverage data may include unrelated changes.
Quick fix: rebase this PR. Learn more →

Coverage increased (+0.1%) to 91.288%

Details

  • Coverage increased (+0.1%) from the base build.
  • Patch coverage: 78 of 78 lines across 3 files are fully covered (100%).
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 6164
Covered Lines: 5627
Line Coverage: 91.29%
Coverage Strength: 104.68 hits per line

💛 - Coveralls

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.

2 participants