From 66bbc4e7fb67ac8a244ba66f75e0c1d8b1cabf16 Mon Sep 17 00:00:00 2001 From: raghunandanarava Date: Mon, 6 Jun 2022 10:28:06 +0200 Subject: [PATCH] Changed the exception message for a check in requestToken method #44 --- src/token/token.service.spec.ts | 2 +- src/token/token.service.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/token/token.service.spec.ts b/src/token/token.service.spec.ts index 02a26f07..583b9127 100644 --- a/src/token/token.service.spec.ts +++ b/src/token/token.service.spec.ts @@ -85,7 +85,7 @@ describe('TokenService', () => { describe('requestToken', () => { it('should fail if empty issuer is provided', async () => { await expect(service.requestToken(undefined)).rejects.toThrow( - 'Received issuer does not contain the token endpoint to get a token', + 'Received issuer is empty', ); }); }); diff --git a/src/token/token.service.ts b/src/token/token.service.ts index 4d3fcd84..c699af6a 100644 --- a/src/token/token.service.ts +++ b/src/token/token.service.ts @@ -52,7 +52,7 @@ export class TokenService { async requestToken(issuer: Issuer): Promise { if (issuer === undefined) { throw new HttpException( - 'Received issuer does not contain the token endpoint to get a token', + 'Received issuer is empty', HttpStatus.BAD_REQUEST, ); }