Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(HTTP Request Node): Handle special characters in pagination expressions + improve hint text #8576

Conversation

elsmr
Copy link
Member

@elsmr elsmr commented Feb 7, 2024

Summary

  • Fix for: apostrophe in node name makes pagination expressions fail
  • Expression color now always updates when the node has new output data (was working for input but not output)
  • Improved hint text for 2 HTTP Request node parameters
  • More helpful error message when "Next URL" is not configured properly
image

Related tickets and issues

https://linear.app/n8n/issue/NODE-1097/http-request-node-apostrophe-in-node-name-makes-pagination-expressions

Review / Merge checklist

  • PR title and summary are descriptive. Remember, the title automatically goes into the changelog. Use (no-changelog) otherwise. (conventions)
  • Docs updated or follow-up ticket created.
  • Tests included.

    A bug is not considered fixed, unless a test is added to prevent it from happening again.
    A feature is not complete without tests.

@elsmr elsmr changed the title fix(HTTP Request Node): Correct pagination expression evaluation and improve hint text fix(HTTP Request Node): Handle special characters in pagination expressions + improve hint text Feb 7, 2024
@n8n-assistant n8n-assistant bot added core Enhancement outside /nodes-base and /editor-ui n8n team Authored by the n8n team node/improvement New feature or request ui Enhancement in /editor-ui or /design-system labels Feb 7, 2024
throw new NodeOperationError(node, `'${paginateRequestData.url}' is not a valid URL.`, {
itemIndex,
runIndex,
type: 'invalid_url',
Copy link
Contributor

Choose a reason for hiding this comment

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

I would avoid extending NodeApiError interface for this special case, as this error would be replaced in Http node anyway we could send some technical message for identification

Copy link
Member Author

Choose a reason for hiding this comment

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

I prefer using a type to check on instead of using the message. We also use this pattern for other errors (like ExpressionError)

Copy link

cypress bot commented Feb 12, 2024

1 flaky test on run #4083 ↗︎

0 343 5 0 Flakiness 1

Details:

🌳 master 🖥️ browsers:node18.12.0-chrome107 🤖 PR User 🗃️ e2e/*
Project: n8n Commit: 3b2078c3ca
Status: Passed Duration: 03:42 💡
Started: Feb 13, 2024 3:10 AM Ended: Feb 13, 2024 3:14 AM
Flakiness  cypress/e2e/5-ndv.cy.ts • 1 flaky test

View Output Video

Test Artifacts
NDV > should not retrieve remote options when required params throw errors Test Replay Screenshots Video

Review all test suite changes for PR #8576 ↗︎

Copy link
Contributor

✅ All Cypress E2E specs passed

@elsmr elsmr merged commit 3b2078c into master Feb 12, 2024
30 checks passed
@elsmr elsmr deleted the node-1097-http-request-node-apostrophe-in-node-name-makes-pagination branch February 12, 2024 16:32
@github-actions github-actions bot mentioned this pull request Feb 15, 2024
@janober
Copy link
Member

janober commented Feb 15, 2024

Got released with n8n@1.29.0

despairblue pushed a commit that referenced this pull request Feb 16, 2024
…ssions + improve hint text (#8576)

Co-authored-by: Michael Kret <michael.k@radency.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Enhancement outside /nodes-base and /editor-ui n8n team Authored by the n8n team node/improvement New feature or request Released ui Enhancement in /editor-ui or /design-system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants