Skip to content

Raise error when it fails to fetch the access token#253

Merged
AgustinSilverfin merged 1 commit into
mainfrom
agustin-raise-error-message-auth
May 13, 2026
Merged

Raise error when it fails to fetch the access token#253
AgustinSilverfin merged 1 commit into
mainfrom
agustin-raise-error-message-auth

Conversation

@AgustinSilverfin
Copy link
Copy Markdown
Contributor

@AgustinSilverfin AgustinSilverfin commented May 13, 2026

Fixes # (link to the corresponding issue if applicable)

Description

Raise error when it fails to fetch the access token and there is no error.response most likely due to network issues. This will help us debug where the issue comes from in these cases

Testing Instructions

Steps:

  1. ...
  2. ...
  3. ...

Author Checklist

  • Skip bumping the CLI version

Reviewer Checklist

  • PR has a clear title and description
  • Manually tested the changes that the PR introduces
  • Changes introduced are covered by tests of acceptable quality

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 13, 2026

Review Change Stack

Walkthrough

This patch improves error reporting in SilverfinAuthorizer by guarding three token/key refresh methods against undefined error.response. Network errors without HTTP responses now log fallback messages instead of crashing or failing silently. Version 1.54.2 is released with changelog documentation.

Changes

Error Handling Improvements

Layer / File(s) Summary
Error response guard checks in refresh methods
lib/api/silverfinAuthorizer.js
refreshFirm, refreshPartner, and #getFirmAccessToken now check for error.response before reading status/description; missing responses trigger fallback error logging with the raw error.
Version bump and changelog update
package.json, CHANGELOG.md
Version updated to 1.54.2 and changelog entry documents the fix for error reporting in silverfin authorize, refresh-token, and partner-key refresh flows.

🎯 2 (Simple) | ⏱️ ~8 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description is incomplete. The Description section lacks detail on specific changes made, and Testing Instructions are left as a placeholder template without actual steps provided. Provide concrete testing steps and complete details about the changes. For example, explain how to reproduce the error scenario and verify the fix works correctly.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: improving error handling to ensure errors are raised and visible when token access fails, which aligns with the code changes in silverfinAuthorizer.js.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch agustin-raise-error-message-auth

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@robindeclercq robindeclercq self-requested a review May 13, 2026 13:37
@AgustinSilverfin AgustinSilverfin merged commit 26dec65 into main May 13, 2026
3 checks passed
@AgustinSilverfin AgustinSilverfin deleted the agustin-raise-error-message-auth branch May 13, 2026 13:37
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