catch errors
							parent
							
								
									0ab94c807e
								
							
						
					
					
						commit
						9290e3c853
					
				
							
								
								
									
										6
									
								
								index.js
								
								
								
								
							
							
						
						
									
										6
									
								
								index.js
								
								
								
								
							|  | @ -44,14 +44,14 @@ app.post('/', function(req, res) { | |||
| 	if (!html) { | ||||
| 		res.status(400).send("Please provide a POST parameter called html"); | ||||
| 	} else {	  	 | ||||
| 		//try {
 | ||||
| 		try { | ||||
| 		let document = new JSDOM(html); | ||||
| 		let markdown = process_dom(url, document, res); | ||||
| 		send_headers(res); | ||||
| 		res.send(markdown); | ||||
| 		/*} catch (error) { | ||||
| 		} catch (error) { | ||||
| 			res.status(400).send("Could not parse that document"); | ||||
| 		}*/ | ||||
| 		} | ||||
| 	} | ||||
| 
 | ||||
| }); | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue