From bb1560a2a86151118b5db46e94f3c269f3c39303 Mon Sep 17 00:00:00 2001 From: Samuel Gomez Date: Tue, 25 Jul 2023 16:37:21 +0200 Subject: [PATCH] Fixes #506 by console.error'ing the reason for createGrant failure --- keycloak.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/keycloak.js b/keycloak.js index 101233f9..fc94f11e 100644 --- a/keycloak.js +++ b/keycloak.js @@ -327,7 +327,10 @@ Keycloak.prototype.getGrant = function (request, response) { self.storeGrant(grant, request, response) return grant }) - .catch(() => { return Promise.reject(new Error('Could not store grant code error')) }) + .catch(reason => { + console.error(reason) + return Promise.reject(new Error('Could not store grant code error')) + }) } return Promise.reject(new Error('Could not obtain grant code error'))