diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2017-01-06 12:30:35 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2017-01-06 12:30:35 +0900 |
| commit | 89a3d6789cb1ed00b0082b6074fe59b3a8033464 (patch) | |
| tree | c96c2416b055347826dcece2f27b90ee7cc268b8 /src/api | |
| parent | Refactor: Rename userkey --> access-token (diff) | |
| download | sharkey-89a3d6789cb1ed00b0082b6074fe59b3a8033464.tar.gz sharkey-89a3d6789cb1ed00b0082b6074fe59b3a8033464.tar.bz2 sharkey-89a3d6789cb1ed00b0082b6074fe59b3a8033464.zip | |
[API] Improve: Better error message
Diffstat (limited to 'src/api')
| -rw-r--r-- | src/api/authenticate.ts | 2 | ||||
| -rw-r--r-- | 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 2304acff21..6b70b0bfa8 100644 --- a/src/api/authenticate.ts +++ b/src/api/authenticate.ts @@ -47,7 +47,7 @@ export default (req: express.Request) => new Promise<IAuthContext>(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 49269ac445..7a8d2d4354 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 |