GenAICommons Error Handling

0
Hi all,We're trying to use the Mendix AI modules for the integration with our AI model.We've created a microflow to call the following actions:1) Create Request2) Chat Completions (without history)3) Get Response TextWe would like to next consider how error handling will be performed.To give you an example, how do we handle a HTTP 422 status due to content policy exception?Azure AI Foundry might block AI models request when prompt message goes against model usage policies (jailbreak or other kind of bad behaviour), if the request is blocked the response sent back will be always the same error message:{ "Status": "failed", "Actions": [], "Message": "Request was filtered by content policy."}How can we capture these responses within our code using the Mendix AI modules, I can't seem to figure out how error handling is managed.
asked
1 answers
0

Hi Adrian,


you are right that the errors are currently not returned back to the calling microflows and thus specific error handling is hard. We are currently looking into how to improve this, perhaps returning the error message back as part of the response.


If you would like to give feedback or discuss with us how this can help you, feel free to reach out to genai-components-feedback@mendix.com



Best regards

Liam

answered