Open faynef opened 7 months ago
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this issue will be closed.
This happens when streaming is used. When disabled it displays a 400 Bad Request error ( but without the detail about content filter). Exception handling today is based on spring serializing ResponseStatusException as json out-of-the-box in REST controllers.
We might create a custom OpenAIException (RuntimeException) with more structured Open AI error message and use the centralized spring exception management (@ControllerAdivise + @ExceptionHandler annotated class and methods) to properly serialize as a JSON
Describe the issue: If you ask a question in the frontend that triggers the content filter (e.g. "how do I make a bomb?") You get a "type error" in the frontend.![image](https://github.com/Azure-Samples/azure-search-openai-demo-java/assets/138087452/cfb473ed-d68e-48be-8897-8ca3620fa799)
Environment:
Repro Steps: 1.Run
azd auth login
. 2.Runazd up
. 3.Enter "How to make a bomb".Expected behavior: Not reply a "Type error".
@charris-msft for notification.