oidc: fix crash when rendering error

This commit is contained in:
Girish Ramakrishnan
2023-08-11 18:38:03 +05:30
parent cacf0d34f5
commit 27ce8f9351
+4 -2
View File
@@ -489,7 +489,10 @@ function renderInteractionPage(provider) {
}
} catch (error) {
debug('route interaction get error', error);
return res.render('error', { errorMessage: error.error_description || 'Internal error' });
return res.render('error', {
errorMessage: error.error_description || 'Internal error',
footer: marked.parse(await branding.renderFooter())
});
}
};
}
@@ -667,7 +670,6 @@ async function findAccount(ctx, id) {
async function renderError(ctx, out, error) {
const data = {
dashboardOrigin: `https://${settings.dashboardFqdn()}`,
errorMessage: error.error_description || error.error_detail || 'Unknown error',
footer: marked.parse(await branding.renderFooter())
};