PortGate

Resources · Troubleshooting · Q&A

The proxy returned HTTP 400 for a prompt

HTTP 400 means the local proxy matched an injection rule and did not forward the prompt.

Check command

curl -sS http://127.0.0.1:8787/v1/chat/completions

Copied.

The proxy returns HTTP 400 when the user text matches an injection pattern such as “ignore previous instructions” or a request to reveal the system prompt. The prompt is not sent to OpenAI or Anthropic.

See the same decision locally

Paste the user text into the prompt injection tester. The page runs the same rules and does not call a model.

A blocked call is the guard working. If a benign prompt matches, shorten the instruction that looks like an override. Do not disable the proxy to “make the call succeed.”