chore: handle copy error object message
This commit is contained in:
parent
16bfd6eafb
commit
10f3f7cea5
@ -37,6 +37,16 @@ export default function LoadModelErrorDialog() {
|
|||||||
|
|
||||||
if (typeof error === 'string') return error
|
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) {
|
if (typeof error === 'object' && 'code' in error && 'message' in error) {
|
||||||
const errorObj = error as {
|
const errorObj = error as {
|
||||||
code?: string
|
code?: string
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user