mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-07-02 03:02:19 +08:00
fix(plugin-fm): fix page crash when 413 in local dev (#4560)
This commit is contained in:
parent
2dfa7a2625
commit
8cc5ad2abf
@ -116,7 +116,12 @@ export const getThumbURL = (target: any) => {
|
||||
export function getResponseMessage({ error, response }: UploadFile<any>) {
|
||||
if (error instanceof Error && 'isAxiosError' in error) {
|
||||
// @ts-ignore
|
||||
return error.response.data?.errors?.map?.((item) => item?.message).join(', ');
|
||||
if (error.response) {
|
||||
// @ts-ignore
|
||||
return error.response.data?.errors?.map?.((item) => item?.message).join(', ');
|
||||
} else {
|
||||
return error.message;
|
||||
}
|
||||
}
|
||||
if (!response) {
|
||||
return '';
|
||||
|
Loading…
x
Reference in New Issue
Block a user