mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-12-21 04:41:29 +03:00
fix(core): log error detail when import failed (#8930)
This commit is contained in:
parent
6ac8cca440
commit
e3a8f1e9bd
@ -5,6 +5,7 @@ import type {
|
||||
WORKSPACE_DIALOG_SCHEMA,
|
||||
} from '@affine/core/modules/dialogs';
|
||||
import { UrlService } from '@affine/core/modules/url';
|
||||
import { DebugLogger } from '@affine/debug';
|
||||
import { useI18n } from '@affine/i18n';
|
||||
import track from '@affine/track';
|
||||
import {
|
||||
@ -30,6 +31,8 @@ import { type ReactElement, useCallback, useState } from 'react';
|
||||
|
||||
import * as style from './styles.css';
|
||||
|
||||
const logger = new DebugLogger('import');
|
||||
|
||||
type ImportType = 'markdown' | 'markdownZip' | 'notion' | 'snapshot' | 'html';
|
||||
type AcceptType = 'Markdown' | 'Zip' | 'Html';
|
||||
type Status = 'idle' | 'importing' | 'success' | 'error';
|
||||
@ -421,6 +424,7 @@ export const ImportDialog = ({
|
||||
status: 'failed',
|
||||
error: errorMessage || undefined,
|
||||
});
|
||||
logger.error('Failed to import', error);
|
||||
}
|
||||
},
|
||||
[docCollection, t]
|
||||
|
Loading…
Reference in New Issue
Block a user