TypeScript API / laikacms/json-api / warningsFromMeta
Function: warningsFromMeta()
ts
function warningsFromMeta(meta): readonly LaikaError<ErrorCode, number>[];Extract upstream JSON:API meta.warnings from a parsed response body and convert each into a typed LaikaError. Used by JSON:API proxy backends to re-emit upstream warnings as local recoverableErrors so warnings flow end-to-end through a proxy chain instead of dying at every hop.
Tolerant: unrecognized shapes return [] rather than throw — a proxy should never make its caller's stream blow up just because the upstream meta was malformed.
Parameters
| Parameter | Type |
|---|---|
meta | unknown |
Returns
readonly LaikaError<ErrorCode, number>[]