Skip to content

fix: trim whitespace from query parameters to prevent cryptic errors - #208

Merged
willswire merged 1 commit into
mainfrom
fix/trim-input-whitespace
Mar 4, 2026
Merged

fix: trim whitespace from query parameters to prevent cryptic errors#208
willswire merged 1 commit into
mainfrom
fix/trim-input-whitespace

Conversation

@willswire

@willswire willswire commented Mar 4, 2026

Copy link
Copy Markdown
Owner

Leading/trailing spaces in the workers.dev URL (common when copy-pasting from Cloudflare) caused UniFi to show unhelpful error messages. Trimming input parameters handles this gracefully.

Changes

Closes #196

Checklist

  • I have performed a self-review of my code
  • If it is a new feature, I have added thorough tests.

Leading/trailing spaces in the workers.dev URL (common when copy-pasting
from Cloudflare) caused UniFi to show unhelpful error messages. Trimming
input parameters handles this gracefully.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Mar 4, 2026

Copy link
Copy Markdown
Contributor

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 100% 65 / 65
🔵 Statements 100% 65 / 65
🔵 Functions 100% 5 / 5
🔵 Branches 100% 50 / 50
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
src/index.ts 100% 100% 100% 100%
Generated in workflow #108 for commit dd59f4a by the Vitest Coverage Report Action

@willswire
willswire merged commit c7a71fc into main Mar 4, 2026
4 checks passed
@willswire
willswire deleted the fix/trim-input-whitespace branch March 4, 2026 01:50
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.

workers.dev link leading space results in cryptic error message

1 participant