Currently we don't handle specific Guardrails type exception for code generation status detail, which leads to throw a general error and not help user self diagnose the prompt.
Solution
This PR proposes:
Specific error handling for GuardrailsException, PromptRefusalException, EmptyPatchException, ThrottlingException
Small refactor to use CodeGenerationStatus enum instead of single string
License
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Problem
Currently we don't handle specific Guardrails type exception for code generation status detail, which leads to throw a general error and not help user self diagnose the prompt.
Solution
This PR proposes:
License
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.