Skip to content

TypeScript API / laikacms/json-api / laikaErrorFromJsonApiError

Function: laikaErrorFromJsonApiError() ​

ts
function laikaErrorFromJsonApiError(err): LaikaError;

Convert one JSON:API error object back into a typed LaikaError, looking the class up by its code field.

Parameters ​

ParameterType
err{ code: string; detail: string; source?: { parameter?: string; pointer?: string; }; status: string; title: string; }
err.codestring
err.detailstring
err.source?{ parameter?: string; pointer?: string; }
err.source.parameter?string
err.source.pointer?string
err.statusstring
err.titlestring

Returns ​

LaikaError

Released under the MIT License.