mirror of
https://github.com/siteboon/claudecodeui.git
synced 2026-04-17 11:01:30 +00:00
11 lines
309 B
TypeScript
11 lines
309 B
TypeScript
export const gitEmailPattern = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
|
|
export const readErrorMessageFromResponse = async (response: Response, fallback: string) => {
|
|
try {
|
|
const payload = (await response.json()) as { error?: string };
|
|
return payload.error || fallback;
|
|
} catch {
|
|
return fallback;
|
|
}
|
|
};
|