Skip to content

fix(http): use addEncodedPathSegments to stop double-encoding path ID#330

Merged
googsvg merged 5 commits into
mainfrom
CUST-5497-v-3-java-sdk-v-2-16-0-double-encodes-attachment-i-ds-causing-404-errors-on-gmail-attachment-downloads
Jun 24, 2026
Merged

fix(http): use addEncodedPathSegments to stop double-encoding path ID#330
googsvg merged 5 commits into
mainfrom
CUST-5497-v-3-java-sdk-v-2-16-0-double-encodes-attachment-i-ds-causing-404-errors-on-gmail-attachment-downloads

Conversation

@JosiasMB

@JosiasMB JosiasMB commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Related to issue: #329

I confirm that this contribution is made under the terms of the MIT license and that I have the authority necessary to make this contribution on behalf of its copyright owner.

@googsvg googsvg left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Fix linter, add to changelog md

@codecov-commenter

codecov-commenter commented Jun 24, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 94.23077% with 15 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.73%. Comparing base (2c33e4b) to head (09bde09).

Files with missing lines Patch % Lines
src/main/kotlin/com/nylas/NylasClient.kt 87.30% 4 Missing and 4 partials ⚠️
src/main/kotlin/com/nylas/resources/Notetakers.kt 50.00% 0 Missing and 7 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main     #330      +/-   ##
============================================
+ Coverage     81.81%   83.73%   +1.92%     
- Complexity      450      486      +36     
============================================
  Files            44       44              
  Lines          1292     1359      +67     
  Branches        111      115       +4     
============================================
+ Hits           1057     1138      +81     
+ Misses          168      149      -19     
- Partials         67       72       +5     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@AaronDDM AaronDDM left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Good morning! Nice fix — the double-encoding was hitting every resource, not just attachments, so routing pre-encoded paths through addEncodedPathSegments is the right call, and the dedicated test for the v0:...=:... attachment id (plus the per-verb encoded tests) covers it well. CHANGELOG unreleased entry is present. Approving.

Two non-blocking notes left inline (grant identifier is no longer percent-encoded, and the parallel *Encoded API surface). Neither blocks merge.

Comment thread src/main/kotlin/com/nylas/resources/Attachments.kt Outdated
Comment thread src/main/kotlin/com/nylas/NylasClient.kt
@googsvg googsvg merged commit c02aaf7 into main Jun 24, 2026
5 checks passed
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.

4 participants