microsoft / microsoft/Power-Fx
How to handle failures at NLHandler?
@nguhoa is already working on this.
Since Dec 17, 2024.
- Dominant language
- C#
- Stars
- 3.4k
- Forks
- 358
- Avg merge
- 10h 34m
- Merged PRs (30d)
- 3
Description
If the underlying NL network call fails (due to 429, 500, 400 or whatever - the reason doesn't matter here ) -
- 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).
- 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:
- Return a specific object? Ie, with an error field filled out.
- 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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.