Repository navigation
fix(api): URL-encode query string values - #184
Merged
Merged
Conversation
Gabrielpanga
changed the base branch from
master
to
feat/cc-metadata-bill-post-date
October 5, 2026 06:09
FranDisalvo90
approved these changes
Oct 5, 2026
cernadasjuan
approved these changes
Oct 5, 2026
mapToQueryString concatenated raw values. Cursors are base64, so they carry '+', '/' and '='; an unencoded '+' reaches the server as a space and the cursor no longer decodes, which breaks fetchTransactionsCursor and fetchAllTransactions on the pages whose cursor has one. Array values are still sent comma-separated.
Gabrielpanga
force-pushed
the
fix/encode-query-values
branch
from
October 5, 2026 13:11
8705d5f to
66f5a90
Compare
pluggy-github-app Bot
pushed a commit
that referenced
this pull request
Oct 8, 2026
# [0.92.0](v0.91.0...v0.92.0) (2026-10-08) ### Bug Fixes * **api:** URL-encode query string values ([#184](#184)) ([16f0596](16f0596)) * **deps:** patch handlebars, http-cache-semantics and brace-expansion advisories ([#187](#187)) ([0ef8d00](0ef8d00)) ### Features * add Smart Transfer linkedJourney, data consent and source account balance ([#186](#186)) ([c77e1c3](c77e1c3)) * **item:** add fetchItemsCursor and fetchAllItems for GET /v2/items ([#185](#185)) ([7a82811](7a82811)) * sync with the API spec (card metadata, SCR, merchants, category rules, pix-qr, boletos) ([#183](#183)) ([d0f0c86](d0f0c86))
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
mapToQueryStringbuilt the query string with raw values (key + '=' + value). Cursor pagination cursors are standard base64 (afteronGET /v2/transactions), so they can contain+,/and=. An unencoded+is decoded by the server as a space, so the cursor no longer decodes:fetchTransactionsCursorwithafter, andfetchAllTransactionspast the first page, fail intermittently, only on pages whose cursor happens to contain a+.Every value (and key) is now passed through
encodeURIComponent. Array values are encoded item by item and joined with a literal comma, so list params such asidsare sent exactly as before. No caller pre-encoded values, so nothing gets double-encoded.Tests
Two tests in
tests/transactions.test.ts: a cursor containing+,/and==reaches the API intact (this one fails on master and passes with the fix), andidsstays comma-separated.pnpm test: 62/62.Note
Stacked on #183 (merge #183 first; GitHub then retargets this PR to
master). #185 is stacked on this one.