mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Merge pull request #3176 from omnivore-app/fix/import-csv-error-message
Web: show more descriptive error message for csv uploading on home page
This commit is contained in:
commit
3a6b11cf1e
1 changed files with 16 additions and 7 deletions
|
|
@ -157,13 +157,22 @@ export function UploadModal(props: UploadModalProps): JSX.Element {
|
|||
}
|
||||
}
|
||||
|
||||
const result = await uploadImportFileRequestMutation(
|
||||
UploadImportFileType.URL_LIST,
|
||||
contentType
|
||||
)
|
||||
return {
|
||||
uploadSignedUrl: result?.uploadSignedUrl,
|
||||
message: `Importing ${urlCount} URLs`,
|
||||
try {
|
||||
const result = await uploadImportFileRequestMutation(
|
||||
UploadImportFileType.URL_LIST,
|
||||
contentType
|
||||
)
|
||||
return {
|
||||
uploadSignedUrl: result?.uploadSignedUrl,
|
||||
message: `Importing ${urlCount} URLs`,
|
||||
}
|
||||
} catch (error) {
|
||||
console.log('caught error', error)
|
||||
if (error == 'UPLOAD_DAILY_LIMIT_EXCEEDED') {
|
||||
return {
|
||||
message: 'You have exceeded your maximum daily upload limit.',
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
case 'application/zip': {
|
||||
|
|
|
|||
Loading…
Reference in a new issue