Skip to content

Commit ecbd036

Browse files
fix error message display
1 parent c57d1ec commit ecbd036

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/admin/controllers/eg009DeleteUserProductPermissionProfile.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ eg009DeleteUserProductPermissionProfile.createController = async (req, res) => {
6262
catch (error) {
6363
const errorBody = error && error.response && error.response.body;
6464
// we can pull the DocuSign error code and message from the response body
65-
const errorCode = errorBody && errorBody.errorCode;
66-
const errorMessage = errorBody && errorBody.message;
65+
const errorCode = error && error.status || errorBody && errorBody.errorCode;
66+
const errorMessage = errorBody && errorBody.error_description || errorBody.message;
6767

6868
// In production, may want to provide customized error messages and
6969
// remediation advice to the user.
@@ -95,7 +95,7 @@ eg009DeleteUserProductPermissionProfile.getController = async (req, res) => {
9595
}
9696

9797
await getOrganizationId(req);
98-
98+
9999
const userEmail = req.session.clmEmail;
100100
const sourceFile = (path.basename(__filename))[5].toLowerCase() + (path.basename(__filename)).substr(6);
101101
if (!userEmail || !await checkUserExistsByEmail(req, userEmail)) {

0 commit comments

Comments
 (0)