maylinejix commited on
Commit
02baaa9
·
verified ·
1 Parent(s): 20568f3

Update server.js

Browse files
Files changed (1) hide show
  1. server.js +5 -3
server.js CHANGED
@@ -308,10 +308,12 @@ except Exception as e:
308
  const result = await pollJob(jobId, 300000);
309
 
310
  if (!result.success) {
311
- return res.status(500).json({
312
  author: 'Herza',
313
  status: 500,
314
- data: { error: result.error }
 
 
315
  });
316
  }
317
 
@@ -328,7 +330,7 @@ except Exception as e:
328
  });
329
 
330
  } catch (error) {
331
- res.status(500).json({
332
  author: 'Herza',
333
  status: 500,
334
  data: { error: error.message }
 
308
  const result = await pollJob(jobId, 300000);
309
 
310
  if (!result.success) {
311
+ return res.json({
312
  author: 'Herza',
313
  status: 500,
314
+ data: {
315
+ error: result.error
316
+ }
317
  });
318
  }
319
 
 
330
  });
331
 
332
  } catch (error) {
333
+ res.json({
334
  author: 'Herza',
335
  status: 500,
336
  data: { error: error.message }