# shouldDisplayError

fun shouldDisplayError(error: String): Boolean

Returns true when the given non-null `error` string from a FunctionResponse should be surfaced to the operator. Suppresses blank values and FunctionTool.CONFIRMATION_REQUIRED_ERROR, which is the transient placeholder that a confirmation-gated FunctionTool returns on its first invocation - it is not a real failure (the framework re-executes the tool once the user supplies a confirmation), and printing it as "BaseTool Error" misleads the operator. Other error strings - including FunctionTool.REJECTED_ERROR after the user explicitly types 'no' - are still surfaced.