Skip to content

Commit

Permalink
fix(HTTP Request Node): Add suggestion how to fix '429 - too many req…
Browse files Browse the repository at this point in the history
…uests' errors (#7293)

Github issue / Community forum post (link here to close automatically):
  • Loading branch information
maspio authored Sep 28, 2023
1 parent 8bc369d commit 0bc33b1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
10 changes: 2 additions & 8 deletions packages/editor-ui/src/plugins/i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@
"banners.confirmEmail.toast.success.message": "Please check your inbox and click the confirmation link.",
"banners.confirmEmail.toast.error.heading": "Problem sending confirmation email",
"banners.confirmEmail.toast.error.message": "Please try again later.",
"banners.nonProductionLicense.message": "This n8n instance is not licensed for production purposes!",
"banners.nonProductionLicense.message": "This n8n instance is not licensed for production purposes.",
"banners.trial.message": "1 day left in your n8n trial | {count} days left in your n8n trial",
"banners.trialOver.message": "Your trial is over. Upgrade now to keep automating.",
"banners.v1.message": "n8n has been updated to version 1, introducing some breaking changes. Please consult the <a target=\"_blank\" href=\"https://docs.n8n.io/1-0-migration-checklist\">migration guide</a> for more information.",
Expand Down Expand Up @@ -1893,15 +1893,13 @@
"contextual.workflows.sharing.unavailable.button": "View plans",
"contextual.workflows.sharing.unavailable.button.cloud": "Upgrade now",
"contextual.workflows.sharing.unavailable.button.desktop": "View plans",

"contextual.variables.unavailable.title": "Available on the Enterprise plan",
"contextual.variables.unavailable.title.cloud": "Available on Pro plan",
"contextual.variables.unavailable.title.desktop": "Upgrade to n8n Cloud to collaborate",
"contextual.variables.unavailable.description": "Variables can be used to store and access data across workflows. Reference them in n8n using the prefix <code>$vars</code> (e.g. <code>$vars.myVariable</code>). Variables are immutable and cannot be modified within your workflows.<br/><a href=\"https://docs.n8n.io/environments/variables/\" target=\"_blank\">Learn more in the docs.</a>",
"contextual.variables.unavailable.button": "View plans",
"contextual.variables.unavailable.button.cloud": "Upgrade now",
"contextual.variables.unavailable.button.desktop": "View plans",

"contextual.users.settings.unavailable.title": "Upgrade to add users",
"contextual.users.settings.unavailable.title.cloud": "Upgrade to add users",
"contextual.users.settings.unavailable.title.desktop": "Upgrade to add users",
Expand All @@ -1911,18 +1909,14 @@
"contextual.users.settings.unavailable.button": "View plans",
"contextual.users.settings.unavailable.button.cloud": "Upgrade now",
"contextual.users.settings.unavailable.button.desktop": "View plans",

"contextual.communityNodes.unavailable.description.desktop": "Community nodes feature is unavailable on desktop. Please choose one of our available self-hosting plans.",
"contextual.communityNodes.unavailable.button.desktop": "View plans",

"contextual.upgradeLinkUrl": "https://n8n.io/pricing/",
"contextual.upgradeLinkUrl.cloud": "https://app.n8n.cloud/account/change-plan",
"contextual.upgradeLinkUrl.desktop": "https://n8n.io/pricing/?utm_source=n8n-internal&utm_medium=desktop",

"contextual.feature.unavailable.title": "Available on the Enterprise Plan",
"contextual.feature.unavailable.title.cloud": "Available on the Pro Plan",
"contextual.feature.unavailable.title.desktop": "Available on cloud hosting",

"settings.ldap": "LDAP",
"settings.ldap.note": "LDAP allows users to authenticate with their centralized account. It's compatible with services that provide an LDAP interface like Active Directory, Okta and Jumpcloud.",
"settings.ldap.infoTip": "Learn more about <a href='https://docs.n8n.io/user-management/ldap/' target='_blank'>LDAP in the Docs</a>",
Expand Down Expand Up @@ -2096,4 +2090,4 @@
"executionUsage.button.upgrade": "Upgrade plan",
"executionUsage.expired.text": "Your trial is over. Upgrade now to keep your data.",
"executionUsage.ranOutOfExecutions.text": "You’re out of executions. Upgrade your plan to keep automating."
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -1431,6 +1431,10 @@ export class HttpRequestV3 implements INodeType {
for (let itemIndex = 0; itemIndex < items.length; itemIndex++) {
response = promisesResponses.shift();
if (response!.status !== 'fulfilled') {
if (response.reason.statusCode === 429) {
response.reason.message =
"Try spacing your requests out using the batching settings under 'Options'";
}
if (!this.continueOnFail()) {
if (autoDetectResponseFormat && response.reason.error instanceof Buffer) {
response.reason.error = Buffer.from(response.reason.error as Buffer).toString();
Expand Down
2 changes: 1 addition & 1 deletion packages/workflow/src/NodeErrors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ const STATUS_CODE_MESSAGES: IStatusCodeMessages = {
'403': 'Forbidden - perhaps check your credentials?',
'404': 'The resource you are requesting could not be found',
'405': 'Method not allowed - please check you are using the right HTTP method',
'429': 'The service is receiving too many requests from you! Perhaps take a break?',
'429': 'The service is receiving too many requests from you',

'5XX': 'The service failed to process your request',
'500': 'The service was not able to process your request',
Expand Down

0 comments on commit 0bc33b1

Please sign in to comment.