Skip to content

feat: add allow_unauthenticated input to treat 401 errors as success#83

Open
berglie wants to merge 1 commit into
patrickedqvist:mainfrom
berglie:feature/allow-401
Open

feat: add allow_unauthenticated input to treat 401 errors as success#83
berglie wants to merge 1 commit into
patrickedqvist:mainfrom
berglie:feature/allow-401

Conversation

@berglie

@berglie berglie commented Oct 19, 2025

Copy link
Copy Markdown

Problem
Some users experience 401 errors when Vercel deployments are complete but authentication is not properly configured. Currently, the action treats 401 errors as failures and continues retrying, which is unnecessary when the deployment is actually ready and accessible.

Solution
Added a new optional input parameter allow_unauthenticated that allows 401 errors to be treated as successful deployments. When enabled, the action will stop checking and return successfully upon encountering a 401 status code.

Changes

  • Added allow_unauthenticated input parameter in action.yml (defaults to false)
  • Modified waitForUrl function to handle 401 errors when allow_unauthenticated is true
  • Updated main run function to read and pass the new parameter
  • Updated test helper functions to support the new parameter

Usage

- uses: your-action@v1
  with:
    token: ${{ secrets.GITHUB_TOKEN }}
    allow_unauthenticated: true

Benefits

  • Allows users to proceed when deployment is complete but auth isn't configured
  • Reduces unnecessary retries and timeout failures
  • Maintains backward compatibility (defaults to false)
  • Clear, descriptive parameter name that explains the use case

This addresses the common scenario where users only care that their Vercel preview is deployed and accessible, regardless of authentication status.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants