Add client logger and error code messages
This commit is contained in:
parent
df35c6f7f7
commit
9d9528798f
@ -101,6 +101,18 @@ const intlMessages = defineMessages({
|
||||
id: 'app.presentationUploder.upload.413',
|
||||
description: 'error that file exceed the size limit',
|
||||
},
|
||||
408: {
|
||||
id: 'app.presentationUploder.upload.408',
|
||||
description: 'error for token request timeout',
|
||||
},
|
||||
404: {
|
||||
id: 'app.presentationUploder.upload.404',
|
||||
description: 'error not found',
|
||||
},
|
||||
401: {
|
||||
id: 'app.presentationUploder.upload.401',
|
||||
description: 'error for failed upload token request.',
|
||||
},
|
||||
conversionProcessingSlides: {
|
||||
id: 'app.presentationUploder.conversion.conversionProcessingSlides',
|
||||
description: 'indicates how many slides were converted',
|
||||
|
@ -3,6 +3,7 @@ import PresentationUploadToken from '/imports/api/presentation-upload-token';
|
||||
import Auth from '/imports/ui/services/auth';
|
||||
import Poll from '/imports/api/polls/';
|
||||
import { makeCall } from '/imports/ui/services/api';
|
||||
import logger from '/imports/startup/client/logger';
|
||||
import _ from 'lodash';
|
||||
|
||||
const CONVERSION_TIMEOUT = 300000;
|
||||
@ -171,7 +172,12 @@ const uploadAndConvertPresentation = (
|
||||
.then(() => observePresentationConversion(meetingId, file.name, onConversion))
|
||||
// Trap the error so we can have parallel upload
|
||||
.catch((error) => {
|
||||
console.error(error);
|
||||
logger.debug({
|
||||
logCode: 'presentation_uploader_service',
|
||||
extraInfo: {
|
||||
error,
|
||||
},
|
||||
}, 'Generic presentation upload exception catcher');
|
||||
onUpload({ error: true, done: true, status: error.code });
|
||||
return Promise.resolve();
|
||||
});
|
||||
|
@ -171,6 +171,9 @@
|
||||
"app.presentationUploder.rejectedError": "The selected file(s) have been rejected. Please check the file type(s).",
|
||||
"app.presentationUploder.upload.progress": "Uploading ({0}%)",
|
||||
"app.presentationUploder.upload.413": "File is too large. Please split into multiple files.",
|
||||
"app.presentationUploder.upload.408": "Request upload token timeout.",
|
||||
"app.presentationUploder.upload.404": "404: Invalid upload token",
|
||||
"app.presentationUploder.upload.401": "Request presentation upload token failed.",
|
||||
"app.presentationUploder.conversion.conversionProcessingSlides": "Processing page {0} of {1}",
|
||||
"app.presentationUploder.conversion.genericConversionStatus": "Converting file ...",
|
||||
"app.presentationUploder.conversion.generatingThumbnail": "Generating thumbnails ...",
|
||||
|
Loading…
Reference in New Issue
Block a user