Package de.xima.fc.prompt.service
Class ResponseRefusedException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- de.xima.fc.prompt.service.PromptExecutionException
-
- de.xima.fc.prompt.service.ResponseRefusedException
-
- All Implemented Interfaces:
Serializable
public final class ResponseRefusedException extends PromptExecutionException
Exception thrown when executing a prompt query and the system refused to accept the response from the prompt service, e.g. because violates the system's policies or contains unsafe content such as malware.- Since:
- 8.5.0
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classResponseRefusedException.BuilderBuilder for aResponseRefusedException.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ResponseRefusedException.Builderbuilder()Creates a new builder forResponseRefusedException.StringrefusalReason()Gets the reason why the response was refused.-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Method Detail
-
refusalReason
public String refusalReason()
Gets the reason why the response was refused. This can be used to provide more context about the refusal.- Returns:
- The reason why the response was refused.
-
builder
public static ResponseRefusedException.Builder builder()
Creates a new builder forResponseRefusedException.- Returns:
- The new builder.
-
-