Skip to content

Commit

Permalink
Unauthorize issue
Browse files Browse the repository at this point in the history
  • Loading branch information
vishnuvinay89 committed Dec 26, 2024
1 parent 23f5215 commit 0bc93c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/common/middleware/middleware.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ export class MiddlewareServices {
req.userId,
req.headers['tenantid'],
);
if (rolesOfTenant.name == 'UnauthorizedException') {
if (!rolesOfTenant && rolesOfTenant.response.error == 'Unauthorized') {
return reject("User doesn't have appropriate privilege");
}

Expand Down

0 comments on commit 0bc93c9

Please sign in to comment.