mirror of
https://github.com/stoatchat/javascript-client-sdk.git
synced 2026-07-20 09:35:15 -04:00
[PR #6] [CLOSED] Catch errors from bots.create #47
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/stoatchat/javascript-client-sdk/pull/6
Author: @ThatTonybo
Created: 8/30/2021
Status: ❌ Closed
Base:
master← Head:master📝 Commits (1)
fbb3aeaCatch 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.