-
Notifications
You must be signed in to change notification settings - Fork 7.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update to use AppError.Where() to differentiate errors #24379
Conversation
|
@sbishel: Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it. I understand the commands that are listed here |
|
/update-branch |
|
You don't have permissions to trigger this command. |
|
@lindy65 - Here are the QA Test steps, let me know if they don't make sense. Using the test server, run a GET request to retrieve avaliable Bots. (Using admin token) Get one of the available token Ids and run a GET request to retrieve that specific Bot. (Using Admin Token) You should successfully retrieve as a sysadmin. Change the last character of the valid id, to make an invalid id. You should receive the same exception when using a normal User's token. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks so much for the detailed test steps @sbishel. I had to revive my Postman skills but thanks to your help with the test steps, it wasn't too much of an ordeal 😅
Looks good to me as per your test steps 👍
|
Test server destroyed |
Summary
Updates
MakeBotNotFoundErrorto accept awhereparameter for the AppError object. This allows us in code to distinguish between a bot not found in the database vs a bot was found, but user doesn't have permissions to the bot.In the former case, we return as if the bot does not exist. The
wherevalue of the object is NOT in the return JSON for the API.Ticket Link
Fixes https://mattermost.atlassian.net/browse/MM-54257
Release Note