Skip to content
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

Merged
merged 1 commit into from
May 19, 2023

Conversation

blackchoey
Copy link
Contributor

@blackchoey blackchoey commented May 18, 2023

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

@codecov
Copy link

codecov bot commented May 18, 2023

Codecov Report

Merging #8737 (2e751e1) into dev (d8776a6) will decrease coverage by 0.02%.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@            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     
Impacted Files Coverage Δ
...ackages/fx-core/src/component/driver/aad/create.ts 80.43% <ø> (ø)
...ackages/fx-core/src/component/driver/aad/update.ts 86.66% <ø> (ø)

... and 1 file with indirect coverage changes

@blackchoey blackchoey marked this pull request as ready for review May 18, 2023 06:16
@blackchoey blackchoey requested a review from jidddddd May 18, 2023 06:17
@@ -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\'."}}'
Copy link
Contributor Author

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\'."}}'
Copy link
Contributor Author

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.

@blackchoey blackchoey merged commit 80bb310 into dev May 19, 2023
@blackchoey blackchoey deleted the chyuan/fix-aad-action-error-message branch May 19, 2023 08:15
adashen added a commit that referenced this pull request Jun 5, 2023
…or-aad

fix: no detailed error message in AAD app actions (#8737)
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.

4 participants