Skip to content

Commit

Permalink
Merge pull request #421 from bcgov/test-logging
Browse files Browse the repository at this point in the history
remove debug logs, update user error check
  • Loading branch information
mgtennant authored Oct 19, 2023
2 parents 8e2dafc + c13c79d commit acbefc0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions app/client/src/utilities/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@ async function request(
err.response.data.code &&
err.response.data.description
) {
console.log(err.response.data);
console.log(err.response.data.description);
return Promise.reject(
new ApiError(err.response.data.code, err.response.data.description)
);
Expand Down
2 changes: 1 addition & 1 deletion app/server/middleware/roleValidation.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ module.exports = function (roles) {
return async function (req, res, next) {
try {
const data = await fetchUser(req.currentUser.idir_username.toUpperCase());
if (data !== undefined) {
if (data !== undefined && data !== null) {
const logical = user.convertToLogicalModel(data);

if (roles.some((role) => logical.roleId === role)) {
Expand Down

0 comments on commit acbefc0

Please sign in to comment.