Skip to content

Improve OpenAPI parsing exception logging#7760

Open
AayushP123 wants to merge 3 commits into
microsoft:mainfrom
AayushP123:fix-7014-stacktrace-on-exceptions
Open

Improve OpenAPI parsing exception logging#7760
AayushP123 wants to merge 3 commits into
microsoft:mainfrom
AayushP123:fix-7014-stacktrace-on-exceptions

Conversation

@AayushP123

Copy link
Copy Markdown

Summary

  • Logs the OpenAPI specification path when OpenAPI parsing throws before diagnostics are available.
  • Preserves the existing failure behavior by rethrowing the original exception.
  • Adds regression coverage for malformed x-ms-enum-flags input.

Testing

  • dotnet test ./tests/Kiota.Builder.Tests --filter OpenApiDocumentDownloadServiceTests
  • dotnet build ./src/kiota --no-restore

Fixes #7014

@AayushP123 AayushP123 requested a review from a team as a code owner June 4, 2026 06:05
@AayushP123

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

@baywet baywet left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution!

Comment thread src/Kiota.Builder/OpenApiDocumentDownloadService.cs Outdated

@baywet baywet left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for making the changes!

@baywet baywet enabled auto-merge (squash) June 5, 2026 12:09
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.

Stacktrace on exceptions

2 participants