Budibase/budibase · error · Error
Unsupported method: ${method}
Error message
Unsupported method: ${method} What it means
verbFromMethod normalizes an HTTP method string and maps it through MethodToVerb (get/post/put/patch/delete) to a Budibase QueryVerb. If the normalized method is unknown (empty, or methods like head/options/trace/connect), it throws 'Unsupported method: <method>'.
Source
Thrown at packages/server/src/api/controllers/query/import/sources/base/index.ts:263
bodyType: resolvedBodyType,
},
transformer,
schema,
readable,
queryVerb,
}
if (restTemplateMetadata) {
query.restTemplateMetadata = restTemplateMetadata
}
return query
}
verbFromMethod = (method: string): QueryVerb => {
const normalized = this.normalizeMethod(method)
if (!normalized) {
throw new Error(`Unsupported method: ${method}`)
}
return MethodToVerb[normalized as keyof typeof MethodToVerb]
}
processPath = (path: string): string => {
if (path?.startsWith("/")) {
path = path.substring(1)
}
path = this.convertPathVariables(path)
return path
}
processQuery = (queryString: string): string => {
if (queryString?.startsWith("?")) {
return queryString.substring(1)
}View on GitHub (pinned to a81a902e9a)
Solutions
- Remove or fix the unsupported method entries in the source spec (keep only get/post/put/patch/delete operations)
- Ensure path-level keys are real HTTP methods, not $ref or field names, in the document being imported
- If you need HEAD/OPTIONS endpoints, model them as GET/POST equivalents or add support to MethodToVerb upstream
Example fix
// before
paths:
/ping:
trace:
summary: trace ping # unsupported
// after
paths:
/ping:
get:
summary: ping Defensive patterns
Strategy: validation
Validate before calling
const SUPPORTED = new Set(["get", "post", "put", "patch", "delete"])
function assertSupportedMethods(spec: { paths: Record<string, Record<string, unknown>> }) {
for (const [path, ops] of Object.entries(spec.paths)) {
for (const key of Object.keys(ops)) {
if (!SUPPORTED.has(key.toLowerCase()) && !(key.startsWith("x-") || key === "parameters")) {
throw new Error(`Unsupported method '${key}' on ${path}`)
}
}
}
} Type guard
null
Try / catch
try {
await importer.importQueries(datasourceId)
} catch (e) {
if (String(e?.message).startsWith("Unsupported method:")) {
// remove/replace that operation in the spec and retry
}
throw e
} Prevention
- Keep only get/post/put/patch/delete operations in specs you import
- Avoid stray keys (head/options/trace/$ref) at the path-item level
- Lint the spec before import to catch non-method path keys
When it happens
Trigger: An OpenAPI operation declares pathItem keys or operation methods outside {get,post,put,patch,delete} (e.g. $ref placeholders, 'head', 'options', 'trace', 'servers', 'parameters' leaking into method parsing), or a curl -X flag uses an unsupported verb.
Common situations: Specs that use OpenAPI 3.x extensions at path level which the parser mistakes for methods; specs containing HEAD/OPTIONS-only endpoints; hand-written YAML with a typo like 'Get' handled incorrectly upstream or 'purge'.
Related errors
- Unsupported import data
- Selected endpoint could not be imported
- Empty OpenAPI document
- Failed to load OpenAPI 2 document
- Failed to load OpenAPI 3 document
AI-assisted analysis of Budibase/budibase@a81a902e9a (2026-08-29).
Data as JSON: /api/errors/2179025c012b2b8c.
Report an issue: GitHub.