Skip to content

fix(priorbank): guard non-array apiAccountDetails in convertAccounts#94

Closed
alex-mextner wants to merge 1 commit into
worktree-fix-tbc-ge-non-arrayfrom
fix/priorbank-non-array
Closed

fix(priorbank): guard non-array apiAccountDetails in convertAccounts#94
alex-mextner wants to merge 1 commit into
worktree-fix-tbc-ge-non-arrayfrom
fix/priorbank-non-array

Conversation

@alex-mextner
Copy link
Copy Markdown
Owner

Problem

PriorBank plugin crashes at midnight UTC when the API returns a non-array value for apiAccountDetails:

TypeError: apiAccountDetails.find is not a function
  at convertAccounts (priorbank/converters.js:17:39)

Error is failures:1, self-heals in 30 min, fires every night at 00:00 UTC.

Fix

Added Array.isArray() guard at the top of convertAccounts.

Changes in ZenPlugins fork (alex-mextner/ZenPlugins@896cf8fb):

  • priorbank/converters.js: guard in convertAccounts
  • priorbank/__tests__/converters/accounts/convertAccountsGuard.test.js: 3 tests for null/undefined/object input

Test plan

  • jest --testPathPattern="plugins/priorbank" — 12 suites, 36 tests pass
  • ts-standard clean on changed files
  • tsc --noEmit passes

Depends on #93 (same ZenPlugins branch, stacked commit).

🤖 Generated with Claude Code

PriorBank API returns null/non-array for apiAccountDetails at midnight UTC.
Bumps ZenPlugins to 7b0513a1→896cf8fb (alex-mextner fork).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 21, 2026

🔁 PR closed. Stage bot switched back to main.

@alex-mextner
Copy link
Copy Markdown
Owner Author

Заменено develop-веткой в ZenPlugins — пиннится через #develop напрямую.

@alex-mextner alex-mextner deleted the fix/priorbank-non-array branch May 21, 2026 10:50
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.

1 participant