[PR #6] [CLOSED] Catch errors from bots.create #47

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

📋 Pull Request Information

Original PR: https://github.com/stoatchat/javascript-client-sdk/pull/6
Author: @ThatTonybo
Created: 8/30/2021
Status: Closed

Base: masterHead: master


📝 Commits (1)

  • fbb3aea Catch errors from bots.create

📊 Changes

1 file changed (+17 additions, -13 deletions)

View changed files

📝 src/maps/Bots.ts (+17 -13)

📄 Description

This wraps the requests made in the bots.create method in a try catch block, and throws any errors returned. This means that a .catch(err => ...) can be used on the client to then show any errors from bot creation, such as name already being taken.


🔄 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-sdk/pull/6 **Author:** [@ThatTonybo](https://github.com/ThatTonybo) **Created:** 8/30/2021 **Status:** ❌ Closed **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (1) - [`fbb3aea`](https://github.com/stoatchat/javascript-client-sdk/commit/fbb3aeaa2de3fb26a63b73ebb2732588352ff9da) Catch errors from bots.create ### 📊 Changes **1 file changed** (+17 additions, -13 deletions) <details> <summary>View changed files</summary> 📝 `src/maps/Bots.ts` (+17 -13) </details> ### 📄 Description This wraps the requests made in the bots.create method in a try catch block, and throws any errors returned. This means that a `.catch(err => ...)` can be used on the [client](https://github.com/revoltchat/revite/) to then show any errors from bot creation, such as name already being taken. --- <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:26:54 -05:00
yindo closed this issue 2026-02-16 12:26:54 -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-sdk#47