[PR #36] [CLOSED] FIX: Handle empty response bodies #34

Closed
opened 2026-02-16 12:29:02 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/stoatchat/javascript-client-api/pull/36
Author: @ghost
Created: 8/25/2025
Status: Closed

Base: mainHead: patch-1


📝 Commits (1)

  • 8699571 FIX: Handle empty response bodies

📊 Changes

1 file changed (+20 additions, -1 deletions)

View changed files

📝 src/index.ts (+20 -1)

📄 Description

Previously, the API client would throw a JSON parse error if a response body was empty, this checks for that and handles it without throwing an error – fixes the bug reported on frontend repo here

Please make sure to check the following tasks before opening and submitting a PR

  • I understand and have followed the contribution guide
  • I have tested my changes locally and they are working as intended
    ↑ Unable to test it locally

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/stoatchat/javascript-client-api/pull/36 **Author:** [@ghost](https://github.com/ghost) **Created:** 8/25/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `patch-1` --- ### 📝 Commits (1) - [`8699571`](https://github.com/stoatchat/javascript-client-api/commit/8699571d853ca890d63860e134644e284a82eb07) FIX: Handle empty response bodies ### 📊 Changes **1 file changed** (+20 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src/index.ts` (+20 -1) </details> ### 📄 Description Previously, the API client would throw a JSON parse error if a response body was empty, this checks for that and handles it without throwing an error – fixes the bug reported on frontend repo [here](https://github.com/revoltchat/frontend/issues/418) ## Please make sure to check the following tasks before opening and submitting a PR - [X] I understand and have followed the [contribution guide](https://github.com/revoltchat/.github/blob/master/.github/CONTRIBUTING.md) - [ ] I have tested my changes locally and they are working as intended ↑ Unable to test it locally --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 12:29:02 -05:00
yindo closed this issue 2026-02-16 12:29:02 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: stoatchat/javascript-client-api#34