byu-group-mem
Advanced tools
Comparing version 0.1.2 to 0.1.3
10
index.js
@@ -82,4 +82,3 @@ /** | ||
const message = MembersOfResponse.body.metadata.validation_response.message; | ||
const info = MembersOfResponse.body.metadata.validation_response.validation_information; | ||
return (config.handler ? res.status(code).send(config.handler(MembersOfResponse.body.metadata.code, new Error(message))) : | ||
return (config.handler ? res.status(code).send(config.handler(code, new Error(message))) : | ||
res.status(code).send({metadata: meta(code, message)})); | ||
@@ -90,3 +89,10 @@ } | ||
}) | ||
.catch(err => { | ||
if (config.handler) res.status(500).send(config.handler(code, new Error(message))); | ||
else res.status(500).send({metadata: meta(500, 'Could not verify client group membership.', [err.message])}); | ||
console.error(` [err] Could not verify client group membership:\n${err}`); | ||
console.error(` [err] Please try the request again in a few moments.`); | ||
console.error(` [err] If the problem persists, contact the BYU Persons/v2 API owner.`); | ||
}) | ||
} | ||
}; |
{ | ||
"name": "byu-group-mem", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"description": "Validates the group membership of a person", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
20788
83