Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@koen-lee
Copy link

See #4349; the default exception details are not very helpful.
This PR intends to add the ResponseStatusCode, property of the base ApiException, to the message when no primary message extension is used.

It's not great, the suggestion from the above issue to add the description from the spec is better, but this is (hopefully) an incremental improvement, relatively low impact, and may serve as an example for future improvements by pointing at the relevant code.

Considerations:

  • it interpolates a new string for every call, but there's no easy way around that since ResponseStatusCode is mutable.
  • this could also be implemented in ApiException, but I think that would have higher impact and is less future proof: it's not in the path of fixing Take exception message from OpenAPI document #4349.

@koen-lee koen-lee requested a review from a team as a code owner September 24, 2025 10:34
Copy link
Member

@baywet baywet left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution!

We'll need to coordinate this change across languages to provide a consistent experience. Can you please update the other languages?

@koen-lee
Copy link
Author

@baywet I'm only qualified to write/judge C# code, but if it's OK to have Claude and Copilot to write that code and you trust the unit tests and your own due process, I'll include other languages.

@koen-lee
Copy link
Author

@microsoft-github-policy-service agree company="Logiqs"

@koen-lee koen-lee requested a review from baywet September 25, 2025 11:09
@baywet
Copy link
Member

baywet commented Oct 3, 2025

just for context I'm holding review until we merge #6953 since I believe those PRs will conflict a lot with each other.
Let me know if you have any additional comments or questions.

@koen-lee koen-lee force-pushed the Show-HTTP-status-in-ApiException-Message branch from 3d82525 to 8d55c2b Compare October 3, 2025 16:07
@koen-lee
Copy link
Author

koen-lee commented Oct 3, 2025

@baywet #6953 and this are independent - at least they are now that I have removed the errorcode key from the description in that PR.

@koen-lee
Copy link
Author

koen-lee commented Dec 2, 2025

@baywet What's the plan for these PRs?
Do I add effort to make it mergeable or do we close them?

@baywet
Copy link
Member

baywet commented Dec 11, 2025

@koen-lee Thank you for your patience.
I have transitioned to a new team which is why my responses here are delayed.
Thank you for your understanding.

I'm happy to help you get those merged as long as the feedback I've provided is addressed. I think a first step for this one would be to handle the conflicts.

@koen-lee
Copy link
Author

koen-lee commented Dec 11, 2025

@baywet

@koen-lee Thank you for your patience. I have transitioned to a new team which is why my responses here are delayed. Thank you for your understanding.

I'm happy to help you get those merged as long as the feedback I've provided is addressed. I think a first step for this one would be to handle the conflicts.

The merge conflict has been addressed.
All the best in your new team; I assume Kiota isn't discontinued, will you continue maintenance or should I address somebody else?

Copy link
Member

@baywet baywet left a comment

Choose a reason for hiding this comment

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

I'll try to help you get this PR merged, but moving forward (other PRs) @adrian05-ms and @gavinbarron + others on the team should be helping you :)

@baywet baywet enabled auto-merge (squash) December 15, 2025 19:35
@baywet baywet disabled auto-merge December 15, 2025 19:36
@baywet
Copy link
Member

baywet commented Dec 15, 2025

@koen-lee would you please mind:

  • adding a changelog entry (unlreased, added)
  • merging the latest from main

@koen-lee
Copy link
Author

Thanks, will do. Also, I see some Go and Typescript integration test failures; I'll try to eliminate those too.

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.

3 participants