Skip to content

Fix: restrict Scrape httpMethod to GET/POST to match API schema#236

Merged
RapierCraft merged 1 commit into
mainfrom
fix/scrape-method-enum-222
Jun 3, 2026
Merged

Fix: restrict Scrape httpMethod to GET/POST to match API schema#236
RapierCraft merged 1 commit into
mainfrom
fix/scrape-method-enum-222

Conversation

@RapierCraft

Copy link
Copy Markdown
Owner

Summary

The AlterLab API's UnifiedScrapeRequest.method field is an enum restricted to GET and POST. The n8n node previously exposed PUT, PATCH, and DELETE as valid HTTP Method options in the Scrape resource — any user selecting these would receive a 422 Unprocessable Entity from the API.

Changes

  • Remove PUT, PATCH, DELETE from the httpMethod options array in the Scrape resource
  • Update requestBody field displayOptions to show only for httpMethod: ["POST"] (was ["POST", "PUT", "PATCH"])
  • Improve field descriptions to surface the POST cost multiplier and the GET/POST constraint
  • Bump version 0.10.00.10.1

Testing

  • Set httpMethod to POST — confirm requestBody field appears
  • Set httpMethod to GET — confirm requestBody field is hidden
  • POST scrape with JSON body returns scraped content
  • GET scrape returns scraped content

Closes #222
Implementation branch: fix/scrape-method-enum-222
Base: main

The AlterLab API's UnifiedScrapeRequest.method field is an enum
limited to GET and POST. The n8n node previously offered PUT, PATCH,
and DELETE options which would cause 422 Unprocessable Entity errors
from the API on selection. Removes the invalid options and tightens
the requestBody displayOptions to POST-only.
@RapierCraft

Copy link
Copy Markdown
Owner Author

Security & Quality Review — PR #236 (commit 47a74d7)

No security or quality findings. Execution code verified. Build passes.


@RapierCraft

Copy link
Copy Markdown
Owner Author

PR Review Summary — #236

Reviewed commit: 47a74d7 | Current HEAD: 47a74d7 | Status: CURRENT

Verdict: APPROVED

APPROVED: commit 47a74d7 after security and quality scan (1 agent). 0 findings. Safe to merge.

Context-Aware Review

Domains: TypeScript UI schema | Agents: 1 (General Security)

Integration Checks (Phase 2.5)

  • Execution code consistency: PASS — httpMethod execution at line 2821-2822 correctly handles GET/POST only
  • Session/Crawl PATCH/DELETE references at lines 1877/1906/2087: unaffected by this change
  • Build verification: npm run build PASS
  • TypeScript: tsc --noEmit PASS
  • Purpose Regression Gate (7A): N/A — non-milestone PR

Risk Matrix

Category Risk Blocking? Confidence
Security None No
Type Safety None No
Integration None No

Findings

None.

Automated Checks

Check Result
TypeScript (tsc --noEmit) ✅ PASS
Build (npm run build) ✅ PASS
Secrets detection ✅ CLEAN
Env var audit ✅ CLEAN

Recommendation

Merge. The fix correctly restricts the Scrape httpMethod options to GET/POST, matching the AlterLab API's UnifiedScrapeRequest.method enum constraint. Execution code is consistent. Version bump is appropriate.


Context-aware review complete. 1 agent + integration checks. 0 findings triaged.

@RapierCraft RapierCraft merged commit 691b273 into main Jun 3, 2026
3 checks passed
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.

Sync: Scrape API modification (from #19265)

1 participant