mirror of
https://github.com/jumpserver/lina.git
synced 2026-01-14 03:46:26 +00:00
perf: Add support for error message extraction from plain objects in getErrorResponseMsg
This commit is contained in:
@@ -149,6 +149,11 @@ export function getErrorResponseMsg(error) {
|
||||
.join('; ')
|
||||
} else if (typeof data === 'string') {
|
||||
return data
|
||||
} else if (_.isPlainObject(data)) {
|
||||
return Object.values(data)
|
||||
.map(item => getErrorResponseMsg(item))
|
||||
.filter(i => i)
|
||||
.join('; ')
|
||||
} else {
|
||||
msg = error.toString()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user