DELETE booking requests fail with 422 error - missing support for request_body in destroy method
@AaronDDM arbeitet bereits daran.
Seit 23.2.2026.
Bewertung
Dieses Issue wurde noch nicht bewertet.
Beschreibung
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.
- Vorherrschende Sprache
- Ruby
- Sterne
- 103
- Forks
- 131
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100
Maintainer antworten meist innerhalb von 1 Tag
-
[Bug] Chatwoot v4.19.0 – Super Admin returns 500 due to missing superadmin.scss Vite manifest entryOffenBug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
Maintainer antworten meist innerhalb von 2 Tagen
-
PRM baseline System 1 and 2 fans run continuously in unoccupied hours (low priority)Evtl. vergeben @anchapin hat das vor 1 Tag übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
NatLabRockies/openstudio-standards#2167 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
18F/identity-idp#13734 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Ubuntu 26.04: gems linking OpenSSL statically (e.g. rugged) fail to build – libjitterentropy3-dev missingEvtl. vergeben @BattleAurora hat das vor 1 Tag übernommen. OffenArea: Ruby bug report needs triage OS: Ubuntu
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
actions/runner-images#15068 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 3 Tagen