Repository navigation
[NOTE-1714] feat: accept 207 Multi-Status responses - #550
Merged
Merged
Conversation
The Notetaker media endpoint returns 207 when some requested media (for example the summary) failed but the rest is available. The body carries the available media plus an `errors` list. HTTP_SUCCESS_CODES did not include 207, so download_media raised a NylasApiError and the caller lost the working recording URL. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CEuUhrasuRFEFW6KcTW7QN
agtang96
had a problem deploying
to
sdk-reference
October 25, 2026 02:55 — with
GitHub Actions
Failure
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CEuUhrasuRFEFW6KcTW7QN
agtang96
had a problem deploying
to
sdk-reference
October 25, 2026 02:59 — with
GitHub Actions
Failure
This branch was successfully deployed
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.
Description
HTTP_SUCCESS_CODESis[200, 201, 202, 302], so any 207 Multi-Status response raises aNylasApiError. This PR adds 207 to that list.Why now: the Notetaker media endpoint will return 207 when a requested artifact failed but the rest is available, for example when the summary failed but the recording and transcript are fine. The body carries the available media plus an
errorslist. That behaviour is not live yet; it turns on with an upcoming Notetaker release. Without this change,Notetakers#download_mediawould raise on those responses and callers would lose the media that is available. The Node, Python and Java SDKs already accept any 2xx status.Changes:
lib/nylas/errors.rb: add207toHTTP_SUCCESS_CODES.handle_failed_response, andparse_json_evaluate_errorreturns the parsed 207 body. Both new specs fail without the change.CHANGELOG.md: an Unreleased entry.Testing (Ruby 3.2 in Docker):
bundle exec rspec: 320 examples, 0 failures.bundle exec rubocopon the changed Ruby files: no offenses.CI: Ruby 3, Ruby 3.2 and CodeQL pass. Ruby 3.1, Rubocop and docs fail before running anything, and they would fail on any PR right now:
setup-rubyhas no Ruby 3.1.7 or 3.0.0 build for the ubuntu-26.04 runner.cloudflare/pages-actioncan no longer be resolved.License
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.
🤖 Generated with Claude Code
https://claude.ai/code/session_01CEuUhrasuRFEFW6KcTW7QN