-
Notifications
You must be signed in to change notification settings - Fork 209
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
fix: no detailed error message in AAD app actions #8737
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## dev #8737 +/- ##
==========================================
- Coverage 79.02% 79.00% -0.02%
==========================================
Files 604 604
Lines 41588 41588
Branches 8221 8221
==========================================
- Hits 32863 32857 -6
Misses 5436 5436
- Partials 3289 3295 +6
|
@@ -327,7 +327,9 @@ describe("aadAppCreate", async () => { | |||
expect(result.result._unsafeUnwrapErr()) | |||
.is.instanceOf(UnhandledUserError) | |||
.and.has.property("message") | |||
.and.contains("An unexpected error has occurred while performing the aadApp/create task"); | |||
.and.equals( | |||
'An unexpected error has occurred while performing the aadApp/create task. {"error":{"code":"Request_BadRequest","message":"Invalid value specified for property \'displayName\' of resource \'Application\'."}}' |
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.
@jidddddd can you help review the new message? The API response various in different situation, so we put the raw response here to avoid missing useful information.
@@ -327,7 +327,9 @@ describe("aadAppCreate", async () => { | |||
expect(result.result._unsafeUnwrapErr()) | |||
.is.instanceOf(UnhandledUserError) | |||
.and.has.property("message") | |||
.and.contains("An unexpected error has occurred while performing the aadApp/create task"); | |||
.and.equals( | |||
'An unexpected error has occurred while performing the aadApp/create task. {"error":{"code":"Request_BadRequest","message":"Invalid value specified for property \'displayName\' of resource \'Application\'."}}' |
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.
@jayzhang Please also help review the new message in case it violates the error message practices.
…or-aad fix: no detailed error message in AAD app actions (#8737)
Bug: https://dev.azure.com/msazure/Microsoft%20Teams%20Extensibility/_workitems/edit/23074298
The message in axios error only includes the status code, which can not help users fix the actual problem. Return the response in axiosError.response.data to tell users more details about the error.
This can improve the troubleshooting experience in issue #8733