Extract detection and segmentation workflow hooks
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
export function formatError(error: unknown, fallback: string): string {
|
||||
if (error instanceof Error) {
|
||||
const code = (error as { code?: string }).code
|
||||
return code ? `${error.message} (${code})` : error.message
|
||||
}
|
||||
return fallback
|
||||
}
|
||||
Reference in New Issue
Block a user