rakutentech / docpub

DocPub is a command line utility for converting a folder structure of markdown files to HTML and uploading the result to Zendesk.
MIT License
12 stars 16 forks source link

Uploading markdown containing html tags gives error 500 #12

Closed corycaywood closed 7 years ago

corycaywood commented 7 years ago

On attempt uploading markdown containing <h1></h1> lead to error 500 from ZenDesk.

corycaywood commented 7 years ago

Including HTML in the markdown had no effect on reproducing this error, so it is unrelated to HTML. I was not able to reproduce the error with the latest version, but I was able to reproduce it with the commit where the issue originally occurred: commit a1205f1.

This is the error message:

Fatal Error: Zendesk Error (500): Internal Server Error
at checkRequestResponse (/Users/cory.caywood/GITHUB/docpub/node_modules/node-zendesk/lib/client/client.js:231:13)
at requestCallback (/Users/cory.caywood/GITHUB/docpub/node_modules/node-zendesk/lib/client/client.js:246:3)
at Request._callback (/Users/cory.caywood/GITHUB/docpub/node_modules/node-zendesk/lib/client/client.js:104:5)
at Request.self.callback (/Users/cory.caywood/GITHUB/docpub/node_modules/request/request.js:187:22)
at emitTwo (events.js:106:13)
at Request.emit (events.js:191:7)
at Request.<anonymous> (/Users/cory.caywood/GITHUB/docpub/node_modules/request/request.js:1044:10)
at emitOne (events.js:96:13)
at Request.emit (events.js:188:7)
at IncomingMessage.<anonymous> (/Users/cory.caywood/GITHUB/docpub/node_modules/request/request.js:965:12)
at emitNone (events.js:91:20)
at IncomingMessage.emit (events.js:185:7)
at endReadableNT (_stream_readable.js:975:12)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickCallback (internal/process/next_tick.js:98:9)

Commit a1205f1 was before request retries were introduced, so the program was just crashing anytime it got an error response.

It's possible that too many connections are attempted at once, so I think this is related to the "Socket Hang Up error" in Issue 13. I will close this issue and investigate further with Issue 13.