chore: reorder error
This commit is contained in:
parent
10f3f7cea5
commit
6acdf22e41
@ -37,16 +37,6 @@ 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
|
||||
@ -62,6 +52,16 @@ export default function LoadModelErrorDialog() {
|
||||
return copyText
|
||||
}
|
||||
|
||||
if (typeof error === 'object') {
|
||||
const errorObj = error as {
|
||||
code?: string
|
||||
message: string
|
||||
details?: string
|
||||
}
|
||||
|
||||
return errorObj.message
|
||||
}
|
||||
|
||||
return JSON.stringify(error)
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user