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

How to handle failures at NLHandler? #2772

Open
MikeStall opened this issue Dec 10, 2024 · 0 comments
Open

How to handle failures at NLHandler? #2772

MikeStall opened this issue Dec 10, 2024 · 0 comments
Assignees

Comments

@MikeStall
Copy link
Contributor

MikeStall commented Dec 10, 2024

If the underlying NL network call fails (due to 429, 500, 400 or whatever - the reason doesn't matter here ) -

  1. what should Power Apps do? At the very least, they probably want to get that error and log it. But they may also want to do something in the UI (tell user it failed).
  2. How should that error be communicated at NLHandler?

At API level, we need to sort out NLHandler and comment it clearly:
https://github.com/microsoft/Power-Fx/blob/main/src/libraries/Microsoft.PowerFx.LanguageServerProtocol/Public/NLHandler.cs

Should it:

  1. Return a specific object? Ie, with an error field filled out.
  2. Throw an exception? If so, which exception.

We're seeing FxHttpResponseException thrown from the IntelligenceApiAuthenticatedChannelBase.SendAsync .
But this is an internal exception defined in internal repo; and not publicly part of the contract. It becomes unhandled and bubbles up through LSP as an unhandled exception.

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

No branches or pull requests

2 participants