INNER CODE UNIT · JavaScript

requiredInput

Devolutions/IronRDP · .github/actions/openai-agent/src/main.js:150

function requiredInput(core, name, failureReason, trimWhitespace = true) {
  const value = core.getInput(name, { trimWhitespace });
  if (value.length === 0) throw new ActionError(failureReason, "input");
  return value;
}

function failure(error, phase) {
  if (error instanceof AgentFailure) {
    return { reason: error.reason, category: error.category, retryable: error.retryable };
  }
  if (error instanceof ValidatorFailure) {
    return { reason: error.reason, category: error.category, retryable: false };
  }
  if (error instanceof ActionError) {
    return {
      reason: error.code,
      category: error.phase === "input" ? "input" : "configuration",
      retryable: false,

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…