Skip to content

Implement n8n review feedback for all custom nodes#20

Merged
jaseemjaskp merged 1 commit intomainfrom
fix/n8n-review-feedback-implementation
Dec 12, 2025
Merged

Implement n8n review feedback for all custom nodes#20
jaseemjaskp merged 1 commit intomainfrom
fix/n8n-review-feedback-implementation

Conversation

@Deepak-Kesavan
Copy link
Collaborator

@Deepak-Kesavan Deepak-Kesavan commented Dec 12, 2025

Summary

This PR implements all feedback from n8n node review to ensure full compliance with n8n best practices and standards.

Changes Made

All Nodes

  • ✅ Removed custom sleep implementation, now imported from n8n-workflow
  • ✅ Added usableAsTool: true for AI agent compatibility
  • ✅ Added resource and operation dropdown parameters with displayOptions
  • ✅ Moved optional parameters to "Additional Options" collections
  • ✅ Implemented "Continue on Fail" error handling pattern

Unstract.node.ts & UnstractHitlPush.node.ts

  • ✅ Removed redundant manual Bearer authentication from status polling
  • ✅ Changed status polling to use httpRequestWithAuthentication
  • ✅ Removed manual apiKey extraction from credentials
  • ✅ Maintained returnFullResponse and ignoreHttpStatusErrors for HTTP 422 handling

UnstractHitlFetch.node.ts

  • ✅ Moved HITL Queue Name from Additional Options to required field
  • ✅ Added ignoreHttpStatusErrors: true to handle HTTP 404 responses gracefully
  • ✅ Simplified error handling: returns API errors in response instead of throwing exceptions
  • ✅ Removed hardcoded error message checks for better flexibility

LlmWhisperer.node.ts

  • ✅ Moved 11 optional parameters to Additional Options collection
  • ✅ Maintained alphabetical sorting of options

Testing

  • ✅ All nodes build successfully without TypeScript errors
  • ✅ Manual testing completed for UnstractHitlFetch with actual API endpoints
  • ✅ Verified error handling works correctly for "No approved items available" case
  • ✅ Confirmed all 4 nodes have usableAsTool: true in compiled output

Breaking Changes

None - all changes maintain backward compatibility.

Related Issue

Fixes #[issue-number] (if applicable)

This commit addresses all feedback from Jon's n8n node review to ensure
compliance with n8n best practices and standards.

Changes across all nodes:
- Remove custom sleep implementation, import from n8n-workflow
- Add usableAsTool property to enable AI agent compatibility
- Add resource and operation dropdown parameters with displayOptions
- Move optional parameters to Additional Options collections
- Implement Continue on Fail error handling pattern

Node-specific changes:

Unstract.node.ts & UnstractHitlPush.node.ts:
- Remove redundant manual Bearer authentication from status polling
- Use httpRequestWithAuthentication for all API requests
- Remove manual apiKey extraction from credentials
- Maintain returnFullResponse and ignoreHttpStatusErrors for 422 handling

UnstractHitlFetch.node.ts:
- Move HITL Queue Name from Additional Options to required field
- Add ignoreHttpStatusErrors to handle 404 responses gracefully
- Simplify error handling: return API errors in response instead of throwing
- Remove hardcoded error message checks

LlmWhisperer.node.ts:
- Move 11 optional parameters to Additional Options collection
- Maintain alphabetical sorting of options

All changes maintain backward compatibility while improving code quality,
maintainability, and adherence to n8n conventions.
Copy link
Contributor

@jaseemjaskp jaseemjaskp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jaseemjaskp jaseemjaskp merged commit 5dc9498 into main Dec 12, 2025
1 check passed
@jaseemjaskp jaseemjaskp deleted the fix/n8n-review-feedback-implementation branch December 12, 2025 04:21
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