n8n - 💡(How to fix) Fix Http Request tool if return status code 4xx or 5xx body is empty to AI agent [2 comments, 3 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
n8n-io/n8n#29528Fetched 2026-04-30 06:43:59
View on GitHub
Comments
2
Participants
3
Timeline
7
Reactions
0
Author
Timeline (top)
labeled ×3commented ×2mentioned ×1subscribed ×1

Error Message

  • error: all

Root Cause

If the responde status code 4xx or 5xx from api to any http request tool AI agent can't access to response body of api because is empty

RAW_BUFFERClick to expand / collapse

Bug Description

If the responde status code 4xx or 5xx from api to any http request tool AI agent can't access to response body of api because is empty

To Reproduce

  1. user send request to AI agent for task that require permission
  2. AI Agent excute http tool
  3. api responde to http tool status code 403
  4. AI agent can't nknow response body so can hallucinate

Expected behavior

If status code is 4xx or 5xx the agent should read response body

Debug Info

Debug info

core

  • n8nVersion: 2.17.5
  • platform: docker (cloud)
  • nodeJsVersion: 24.14.1
  • nodeEnv: production
  • database: sqlite
  • executionMode: regular
  • concurrency: 20
  • license: enterprise (sandbox)
  • consumerId: 00000000-0000-0000-0000-000000000000

storage

  • success: all
  • error: all
  • progress: false
  • manual: true
  • binaryMode: filesystem

pruning

  • enabled: true
  • maxAge: 720 hours
  • maxCount: 25000 executions

client

  • userAgent: mozilla/5.0 (x11; linux x86_64) applewebkit/537.36 (khtml, like gecko) chrome/147.0.0.0 safari/537.36
  • isTouchDevice: false

Generated at: 2026-04-29T14:52:59.889Z

Operating System

cloud

n8n Version

2.17.5

Node.js Version

24

Database

SQLite (default)

Execution mode

main (default)

Hosting

n8n cloud

extent analysis

TL;DR

The AI agent should be modified to handle HTTP response bodies for 4xx and 5xx status codes.

Guidance

  • Review the HTTP request tool's configuration to ensure it is set up to return the response body for error status codes.
  • Modify the AI agent's code to parse the response body when receiving 4xx or 5xx status codes from the API.
  • Verify that the API is correctly returning a response body for error status codes.
  • Check the n8n version and Node.js version for any known issues related to HTTP request handling.

Example

No code snippet is provided as the issue lacks specific code details.

Notes

The issue may be related to the specific implementation of the HTTP request tool or the AI agent's code, which is not provided in the issue description.

Recommendation

Apply a workaround by modifying the AI agent's code to handle error status codes and parse the response body accordingly, as the root cause of the issue is likely related to the agent's implementation.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

If status code is 4xx or 5xx the agent should read response body

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

n8n - 💡(How to fix) Fix Http Request tool if return status code 4xx or 5xx body is empty to AI agent [2 comments, 3 participants]