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) => {
|