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

[Text Analytics] Improve message of RequestFailedException when there are multiple errors #34990

Open
joseharriaga opened this issue Mar 17, 2023 · 0 comments
Labels
Client This issue points to a problem in the data-plane of the library. Cognitive - Text Analytics
Milestone

Comments

@joseharriaga
Copy link
Member

Consider the following example:

Azure.RequestFailedException : Failed to process task after several retry
Status: 200 (OK)
ErrorCode: InternalServerError

Additional Information:
Target: #/tasks/items/0
error-0: InternalServerError: Failed to process task after several retry
error-1: InternalServerError: Failed to process task after several retry

Content:
{"jobId":"b8446157-f12f-408d-861a-b4fc5010ba06","lastUpdatedDateTime":"2023-03-08T03:06:23Z","createdDateTime":"2023-03-08T03:06:03Z","expirationDateTime":"2023-03-09T03:06:03Z","status":"partiallySucceeded","errors":[{"code":"InternalServerError","message":"Failed to process task after several retry","target":"#/tasks/items/0"},{"code":"InternalServerError","message":"Failed to process task after several retry","target":"#/tasks/items/1"}],"tasks":{"completed":3,"failed":2,"inProgress":0,"total":5,"items":[{"kind":"PiiEntityRecognitionLROResults","lastUpdateDateTime":"2023-03-08T03:06:04.4079436Z","status":"failed"},{"kind":"EntityRecognitionLROResults","lastUpdateDateTime":"2023-03-08T03:06:04.2836089Z","status":"failed"},{"kind":"KeyPhraseExtractionLROResults","lastUpdateDateTime":"2023-03-08T03:06:05.9435944Z","status":"succeeded","results":{"documents":[{"id":"0","keyPhrases":["Elon Musk","CEO","SpaceX","Tesla"],"warnings":[]},{"id":"1","keyPhrases":["Tesla stock"],"warnings":[]}],"errors":[],"modelVersion":"2022-10-01"}},{"kind":"EntityLinkingLROResults","lastUpdateDateTime":"2023-03-08T03:06:23.6921064Z","status":"succeeded","results":{"documents":[{"id":"0","entities":[{"bingId":"ce6414c0-f9f0-b48b-31f9-42a7dab4db59","name":"Elon Musk","matches":[{"text":"Elon Musk","offset":0,"length":9,"confidenceScore":0.94}],"language":"en","id":"Elon Musk","url":"https://en.wikipedia.org/wiki/Elon_Musk","dataSource":"Wikipedia"},{"bingId":"627fa43a-d963-2c69-46ae-de521d27f9b9","name":"SpaceX","matches":[{"text":"SpaceX","offset":24,"length":6,"confidenceScore":0.63}],"language":"en","id":"SpaceX","url":"https://en.wikipedia.org/wiki/SpaceX","dataSource":"Wikipedia"},{"bingId":"732e1de9-8d5c-15ed-7f0d-7e2169dc9859","name":"Tesla, Inc.","matches":[{"text":"Tesla","offset":35,"length":5,"confidenceScore":0.47}],"language":"en","id":"Tesla, Inc.","url":"https://en.wikipedia.org/wiki/Tesla,_Inc.","dataSource":"Wikipedia"}],"warnings":[]},{"id":"1","entities":[{"bingId":"732e1de9-8d5c-15ed-7f0d-7e2169dc9859","name":"Tesla, Inc.","matches":[{"text":"Tesla","offset":0,"length":5,"confidenceScore":0.05}],"language":"en","id":"Tesla, Inc.","url":"https://en.wikipedia.org/wiki/Tesla,_Inc.","dataSource":"Wikipedia"}],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}},{"kind":"SentimentAnalysisLROResults","lastUpdateDateTime":"2023-03-08T03:06:06.1779551Z","status":"succeeded","results":{"documents":[{"id":"0","sentiment":"neutral","confidenceScores":{"positive":0.01,"neutral":0.99,"negative":0.0},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.01,"neutral":0.99,"negative":0.0},"offset":0,"length":41,"text":"Elon Musk is the CEO of SpaceX and Tesla."}],"warnings":[]},{"id":"1","sentiment":"neutral","confidenceScores":{"positive":0.0,"neutral":1.0,"negative":0.0},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.0,"neutral":1.0,"negative":0.0},"offset":0,"length":36,"text":"Tesla stock is up by 400% this year."}],"warnings":[]}],"errors":[],"modelVersion":"2022-11-01"}}]}}

Headers:
x-envoy-upstream-service-time: 175
apim-request-id: a3a07b78-398d-44e3-9730-6c95193039a4
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
X-Content-Type-Options: nosniff
x-ms-region: REDACTED
Date: Wed, 08 Mar 2023 03:06:24 GMT
Content-Length: 3056
Content-Type: application/json; charset=utf-8

Data:
Target: #/tasks/items/0
error-0: InternalServerError: Failed to process task after several retry
error-1: InternalServerError: Failed to process task after several retry

Notice how the "Additional Information" only references "#/tasks/items/0" but the errors in the "Content" also include "#/tasks/items/1".

@joseharriaga joseharriaga added Client This issue points to a problem in the data-plane of the library. Cognitive - Text Analytics labels Mar 17, 2023
@joseharriaga joseharriaga added this to the 2023-04 milestone Mar 17, 2023
@joseharriaga joseharriaga self-assigned this Mar 17, 2023
@joseharriaga joseharriaga modified the milestones: 2023-04, 2023-05 Apr 10, 2023
@jsquire jsquire modified the milestones: 2023-05, Backlog May 18, 2023
@joseharriaga joseharriaga removed their assignment Aug 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Client This issue points to a problem in the data-plane of the library. Cognitive - Text Analytics
Projects
Development

No branches or pull requests

2 participants