Skip to content

Add support for global error handling #411

@baywet

Description

@baywet

Currently the http core implementations do no try to parse error responses. Those could contain useful information to convey to the consumer.
You can already define responses in open API for HTTP status codes that correspond to errors (4XX, 5XX), however defining those for each endpoint in Microsoft Graph would be fastidious.
Instead we should make use of another feature in openAPI called overlays. This feature is not yet implemented in the openAPI.net lib but it'd allow defining global responses that apply to all the endpoints if not already defined locally.

  • get the schema that's defined in overlays
  • use that information for the API client (to register the error type)
  • modify http core to call deserialization on error response bodies with that type and throw
    AB#10401

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestfixedgeneratorIssues or improvements relater to generation capabilities.

Type

No type

Projects

Status

Done ✔️

Relationships

None yet

Development

No branches or pull requests

Issue actions