chore: handle copy error object message

This commit is contained in:
Faisal Amir 2025-08-14 11:57:28 +07:00
parent 16bfd6eafb
commit 10f3f7cea5

View File

@ -37,6 +37,16 @@ export default function LoadModelErrorDialog() {
if (typeof error === 'string') return error
if (typeof error === 'object') {
const errorObj = error as {
code?: string
message: string
details?: string
}
return errorObj.message
}
if (typeof error === 'object' && 'code' in error && 'message' in error) {
const errorObj = error as {
code?: string