summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2026-05-24 02:03:17 +0200
committerRory& <root@rory.gay>2026-05-24 02:03:17 +0200
commit65a22bbfa45673bf17825d434bc973679833a200 (patch)
tree333bea9fc51f339bcb0be5ae2790ae8d9d065187 /src
parentFix patches (diff)
downloadserver-ts-65a22bbfa45673bf17825d434bc973679833a200.tar.xz
Update npm packages, patches
Diffstat (limited to 'src')
-rw-r--r--src/connections/Spotify/index.ts5
-rw-r--r--src/connections/Twitch/index.ts3
2 files changed, 5 insertions, 3 deletions
diff --git a/src/connections/Spotify/index.ts b/src/connections/Spotify/index.ts

index e64626b1..97884b03 100644 --- a/src/connections/Spotify/index.ts +++ b/src/connections/Spotify/index.ts
@@ -16,7 +16,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. */ -import { ConnectedAccount, ConnectionLoader, DiscordApiErrors, RefreshableConnection } from "@spacebar/util"; +import { ApiError, ConnectedAccount, ConnectionLoader, DiscordApiErrors, RefreshableConnection } from "@spacebar/util"; import wretch from "wretch"; import { GenericOAuthSettings as SpotifySettings } from "../GenericOAuthSettings"; import { ConnectedAccountCommonOAuthTokenResponse, ConnectionCallbackSchema } from "@spacebar/schemas"; @@ -129,7 +129,8 @@ export default class SpotifyConnection extends RefreshableConnection { .unauthorized(async () => { // assume the token was revoked await connectedAccount.revoke(); - return DiscordApiErrors.CONNECTION_REVOKED; + // TODO: this used to be return, investigate how to properly handle this, or how this even behaves? + throw DiscordApiErrors.CONNECTION_REVOKED; }) .json<ConnectedAccountCommonOAuthTokenResponse>() .catch((e) => { diff --git a/src/connections/Twitch/index.ts b/src/connections/Twitch/index.ts
index 116b3192..da2d1f63 100644 --- a/src/connections/Twitch/index.ts +++ b/src/connections/Twitch/index.ts
@@ -124,7 +124,8 @@ export default class TwitchConnection extends RefreshableConnection { .unauthorized(async () => { // assume the token was revoked await connectedAccount.revoke(); - return DiscordApiErrors.CONNECTION_REVOKED; + // TODO: this used to be return, investigate how to properly handle this, or how this even behaves? + throw DiscordApiErrors.CONNECTION_REVOKED; }) .json<ConnectedAccountCommonOAuthTokenResponse>() .catch((e) => {