Skip to content

refactor: standardize unauthorized access error messages in users conroller#841

Open
AdeMi20 wants to merge 1 commit into
MettaChain:mainfrom
AdeMi20:ForbiddenException-messages
Open

refactor: standardize unauthorized access error messages in users conroller#841
AdeMi20 wants to merge 1 commit into
MettaChain:mainfrom
AdeMi20:ForbiddenException-messages

Conversation

@AdeMi20

@AdeMi20 AdeMi20 commented Jun 27, 2026

Copy link
Copy Markdown

To ensure consistent API behavior, the differing authorization error messages in the UsersController were centralized by introducing a new UNAUTHORIZED_ACTION_MESSAGE constant at the top of the src/users/users.controller.ts file. This constant, set to 'You are not authorized to perform this action', replaced the previous hardcoded, inconsistent strings across various handler methods (such as exportData and downloadExport), thereby standardizing the authorization-related ForbiddenException errors thrown throughout the controller.

Close #697

@drips-wave

drips-wave Bot commented Jun 27, 2026

Copy link
Copy Markdown

@AdeMi20 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Inconsistent ForbiddenException messages across user controller handlers

1 participant