Skip to content

Commit

Permalink
Update GigyaApi.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
kovapatrik committed Apr 11, 2024
1 parent 412b215 commit 41b431b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/api/GigyaApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export default class GigyaApi {
const response = await this.apiCall('/accounts.login', params.toString());

if (!response.data.oauth_token || !response.data.oauth_token_secret) {
throw new Error('Gigya session error: no oauth_token or oauth_token_secret in response');
throw new Error(`Gigya session error: no oauth_token or oauth_token_secret in response: ${JSON.stringify(response.data)}`);
}

this.logger.debug('Gigya session received');
Expand All @@ -58,7 +58,7 @@ export default class GigyaApi {
const response = await this.apiCall('/accounts.getJWT', params.toString());

if (!response.data.id_token) {
throw new Error('Gigya JWT error: no id_token in response');
throw new Error(`Gigya JWT error: no id_token in response: ${JSON.stringify(response.data)}`);
}

this.logger.debug('Gigya JWT received');
Expand Down

0 comments on commit 41b431b

Please sign in to comment.