export type GetApiClaudeFable52ApiErrorsOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; /** * Claude Fable 5 2 Api Errors * * GET /claude-fable-5-2-api-errors */ export const getApiClaudeFable52ApiErrors = async (options: GetApiClaudeFable52ApiErrorsOptions) => { const {baseUrl, fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('accept', "text/html") const url = `${baseUrl.replace(/\/+$/, '')}/claude-fable-5-2-api-errors${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "GET", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return res.text() };