fix(core): validate provider body options

This commit is contained in:
Dax Raad 2026-06-24 12:52:44 -04:00
commit 7e6a7b91d5

View file

@ -18,7 +18,7 @@ const lowerer: Lowerer = {
return {
settings: Object.fromEntries(Object.entries(options).filter(([key]) => key !== "headers" && key !== "body")),
headers: record(options.headers, (value): value is string => typeof value === "string"),
body: record(options.body, () => true),
body: record(options.body, (_value): _value is unknown => true),
}
},
model: (options) => ({ ...options }),