DELETE booking requests fail with 422 error - missing support for request_body in destroy method
@AaronDDM がすでに取り組んでいます。
2026年2月23日 から。
評価
この issue はまだ評価されていません。
説明
Describe the bug
The Bookings#destroy method doesn't support passing a request_body parameter (e.g., for cancellation_reason), and the underlying ApiOperations::Delete#delete method hardcodes payload: nil. This causes 422 Unprocessable Entity errors when calling the Nylas API to delete bookings.
When HTTParty sends a DELETE request with payload: nil, it doesn't properly set the Content-Type: application/json header, causing the Nylas API to reject the request. Additionally, there's no way to pass optional body parameters like cancellation_reason which are supported by the Nylas Scheduling API.
To Reproduce
require 'nylas'
nylas = Nylas::Client.new(
api_key: ENV["NYLAS_API_KEY"],
api_uri: ENV["NYLAS_API_URI"]
)
# This fails with 422 Unprocessable Entity error
nylas.scheduler.bookings.destroy(
booking_id: "booking-123",
query_params: { configuration_id: "config-456" }
)
# Error: Nylas::NylasApiError - Unprocessable Entity
# Stack trace shows the error originates from:
# /lib/nylas/handler/http_client.rb:333:in `handle_failed_response'
# /lib/nylas/handler/api_operations.rb:149:in `delete'
# /lib/nylas/resources/bookings.rb:69:in `destroy'
Additionally, there's no way to pass a cancellation_reason:
# This SHOULD work but isn't currently supported
nylas.scheduler.bookings.destroy(
booking_id: "booking-123",
query_params: { configuration_id: "config-456" },
request_body: { cancellation_reason: "Meeting no longer needed" }
)
# Error: unknown keyword: :request_body
Expected behavior
- DELETE requests should work without throwing 422 errors when no request body is needed
- The Bookings#destroy method should accept an optional request_body parameter to support API features like cancellation_reason
- The ApiOperations::Delete#delete method should default to payload: {} instead of payload: nil to ensure proper Content-Type headers are sent
SDK Version:
nylas gem: 6.7.0
Additional context
This issue appears to have been introduced in version 6.5.0 when the SDK switched from rest-client to httparty.
- 主要言語
- Ruby
- スター
- 103
- フォーク
- 131
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 84/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
TheOdinProject/curriculum#31487 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
Bug: Assistant replies lose the space before numbers ("Oct7", "as of10-22-2026") with OpenAI modelsオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
we-promise/sure#4441 ·
メンテナーはふだん 1 日以内に返信