Просмотр исходного кода

[clsi] fix duplicate import of Errors module (#34068)

GitOrigin-RevId: e1dec5e5d439e5d178f9f7400c0873e0be6e90f8
Jakob Ackermann 4 месяцев назад
Родитель
Сommit
e7a202a0bf
1 измененных файлов с 2 добавлено и 3 удалено
  1. 2 3
      services/clsi/app/js/ConversionController.js

+ 2 - 3
services/clsi/app/js/ConversionController.js

@@ -14,7 +14,6 @@ import RequestParser from './RequestParser.js'
 import { pipeline } from 'node:stream/promises'
 import { pipeline } from 'node:stream/promises'
 import Settings from '@overleaf/settings'
 import Settings from '@overleaf/settings'
 import Path from 'node:path'
 import Path from 'node:path'
-import { ConversionError } from './Errors.js'
 
 
 const CONVERSION_CONFIGS = {
 const CONVERSION_CONFIGS = {
   docx: { extension: 'docx' },
   docx: { extension: 'docx' },
@@ -42,7 +41,7 @@ async function convertDocumentToLaTeX(req, res) {
       conversionType
       conversionType
     )
     )
   } catch (err) {
   } catch (err) {
-    if (err instanceof ConversionError) {
+    if (err instanceof Errors.ConversionError) {
       if (err.isUserFacing) {
       if (err.isUserFacing) {
         return res.status(422).json({
         return res.status(422).json({
           error: err.stderr,
           error: err.stderr,
@@ -178,7 +177,7 @@ async function convertProjectToDocument(req, res) {
       await pipeline(readStream, res)
       await pipeline(readStream, res)
     }
     }
   } catch (err) {
   } catch (err) {
-    if (err instanceof ConversionError) {
+    if (err instanceof Errors.ConversionError) {
       if (err.isUserFacing) {
       if (err.isUserFacing) {
         return res.status(422).json({
         return res.status(422).json({
           error: err.stderr,
           error: err.stderr,