Skip to content

Invalid HTTP method (invalid-method)

PubNio invalid-method problem, HTTP 400: codemode.request() was called with a method other than GET, POST, PUT, PATCH, or DELETE.

HTTP 400 Invalid HTTP method. codemode.request() was called with a method other than GET, POST, PUT, PATCH, or DELETE.

When it happens

Only codemode.request() in the MCP execute tool returns it, as data with ok: false.

Response body

{
  "type": "https://pubnio.com/docs/problems/invalid-method/",
  "status": 400,
  "title": "Invalid HTTP method",
  "detail": "Unsupported HTTP method: HEAD.",
  "code": "invalid_method",
  "param": "method",
  "nextAction": "Use one of GET, POST, PUT, PATCH, or DELETE.",
  "requestId": "0f8e4c2a-6b1d-4e3f-8a9b-7c6d5e4f3a21"
}
Field Type Always present
param string No
nextAction string Yes

Recovery for agents

  • Do what nextAction says.
  • param is the field to change.

Retryable

No: no SDK runs in the sandbox and no Retry-After header comes back. Run unchanged, the same script fails the same way.

Limits

  • Match on type or code, not on detail.

Type to search…

↑↓ navigate↵ selectEsc close