UNPKG

@botpress/webchat-client

Version:
13 lines (12 loc) 295 B
async function c(r) { var t; const e = await r.clone().json(); if ((t = e == null ? void 0 : e.id) != null && t.startsWith("err_")) { const o = new Error(e.message); throw o.id = e.id, o.code = e.code, o.type = e.type, o; } return r; } export { c as throwErrorInterceptor };