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

errors description should not be translating to default responses #165

Closed
3 tasks done
baywet opened this issue Jan 25, 2022 · 1 comment · Fixed by #167
Closed
3 tasks done

errors description should not be translating to default responses #165

baywet opened this issue Jan 25, 2022 · 1 comment · Fixed by #167
Assignees
Labels
fixed type:enhancement Enhancement request targeting an existing experience.
Milestone

Comments

@baywet
Copy link
Member

baywet commented Jan 25, 2022

currently the conversion lib describes the errors for any operation as a default response.
This behavior makes it really hard to do anything useful during code generation.
It should instead be using 4XX and 5XX response classes, for more information see this thread.

Update the library to:

  • include a model for the standard odata error and inner error
  • add a convert setting to switch between default and 4xx/5xx response class descriptions (default false)
  • add the responses whenever that switch is set to true

Additional information
https://docs.microsoft.com/en-us/graph/errors

@baywet baywet added the type:enhancement Enhancement request targeting an existing experience. label Jan 25, 2022
@baywet baywet added this to the 1.0.10 milestone Jan 25, 2022
@baywet baywet self-assigned this Jan 25, 2022
@baywet baywet added the fixed label Jan 27, 2022
@baywet
Copy link
Member Author

baywet commented Jan 27, 2022

additionally for inner errors, the odata spec states the following

innererror: optional structured instance with service-defined content.

Which this conversion lib implements by simply declaring an object property with no properties.

But Microsoft Graph defines the inner error with two properties

  • inner error, of type inner error
  • code (string)

We could improve the experience by describing that type in the CSDL.
The conversion library would then locate it by naming convention (called innererror) or using an annotation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fixed type:enhancement Enhancement request targeting an existing experience.
Projects
None yet
1 participant