From 77358e1ca3e2d170048168cdd43052725f9a25dc Mon Sep 17 00:00:00 2001 From: syuilo Date: Fri, 6 Jan 2017 12:30:35 +0900 Subject: [PATCH] [API] Improve: Better error message --- src/api/authenticate.ts | 2 +- src/api/streaming.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/api/authenticate.ts b/src/api/authenticate.ts index 2304acff2..6b70b0bfa 100644 --- a/src/api/authenticate.ts +++ b/src/api/authenticate.ts @@ -47,7 +47,7 @@ export default (req: express.Request) => new Promise(async (resolv }); if (accessToken === null) { - return reject('invalid token'); + return reject('invalid signature'); } const app = await App diff --git a/src/api/streaming.ts b/src/api/streaming.ts index 49269ac44..7a8d2d435 100644 --- a/src/api/streaming.ts +++ b/src/api/streaming.ts @@ -68,7 +68,7 @@ function authenticate(connection: websocket.connection, token: string): Promise< }); if (accessToken == null) { - return reject('invalid token'); + return reject('invalid signature'); } // Fetch user