mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-10 08:25:33 +00:00
21 lines
586 B
TypeScript
21 lines
586 B
TypeScript
// Msteams plugin module implements http error behavior.
|
|
import {
|
|
createProviderHttpError,
|
|
extractProviderErrorDetail,
|
|
} from "openclaw/plugin-sdk/provider-http";
|
|
|
|
export async function createMSTeamsHttpError(
|
|
response: Response,
|
|
label: string,
|
|
options?: { statusPrefix?: string },
|
|
): Promise<Error> {
|
|
return await createProviderHttpError(response, label, options);
|
|
}
|
|
|
|
export async function readMSTeamsHttpErrorDetail(
|
|
response: Response,
|
|
fallback: string,
|
|
): Promise<string> {
|
|
return (await extractProviderErrorDetail(response).catch(() => undefined)) ?? fallback;
|
|
}
|