Skip to content

[FEATURE REQ] FormRecognizer - Error Handling should not need manual string parsing #43195

Open
@wahyuen

Description

@wahyuen

Library name

Azure.AI.FormRecognizer

Please describe the feature.

See #27260

This is a valid concern and even though active participation in the previous ticket, it has been closed by an automated function.

Currently, the SDK appears to throw a RequestFailedException but does not contain any InnerException. The meaningful part of the exception is currently buried under the Message property as a free text string, example as follows:

Invalid request.
Status: 400 (Bad Request)
ErrorCode: InvalidRequest

Content:
{"error":{"code":"InvalidRequest","message":"Invalid request.","innererror":{"code":"InvalidContent","message":"The file is corrupted or format is unsupported. Refer to documentation for the list of supported formats."}}}

Headers:
Transfer-Encoding: chunked
x-envoy-upstream-service-time: 506
apim-request-id: 073013c4-067e-4c31-b275-51cf645f1279
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
X-Content-Type-Options: nosniff
Date: Mon, 28 Feb 2022 07:48:58 GMT
Content-Type: application/json; charset=utf-8

It is an extremely poor consumer experience to expect developers to have to interpret and parse an inner message string in order to determine what the original error that the message relates to. The whole point of an SDK is to provide conveniences to someone consuming it as opposed to not use the SDK.

Additionally, to have the ticket closed due to 'supposed inactivity' given that people have replied as recent as December 2023 just shows the lack of empathy from the team relating to customers reporting issues.

Metadata

Metadata

Assignees

Labels

ClientThis issue points to a problem in the data-plane of the library.Cognitive - Form Recognizercustomer-reportedIssues that are reported by GitHub users external to the Azure organization.needs-team-attentionWorkflow: This issue needs attention from Azure service team or SDK teamquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions