-
Notifications
You must be signed in to change notification settings - Fork 10.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Attempt to throw MissingPDFException
when applicable in node_stream.js
(issue 9791)
#9964
Attempt to throw MissingPDFException
when applicable in node_stream.js
(issue 9791)
#9964
Conversation
6510a6d
to
ac93db4
Compare
/botio test |
From: Bot.io (Linux m4)ReceivedCommand cmd_test from @timvandermeij received. Current queue size: 0 Live output at: http://54.67.70.0:8877/415d83cddba0a36/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_test from @timvandermeij received. Current queue size: 0 Live output at: http://54.215.176.217:8877/e674a5fb39052e5/output.txt |
From: Bot.io (Windows)SuccessFull output at http://54.215.176.217:8877/e674a5fb39052e5/output.txt Total script time: 28.75 mins
|
From: Bot.io (Linux m4)SuccessFull output at http://54.67.70.0:8877/415d83cddba0a36/output.txt Total script time: 35.81 mins
|
let handleResponse = (response) => { | ||
if (response.statusCode === 404) { | ||
const error = new MissingPDFException(`Missing PDF "${this._url}".`); | ||
this._storedError = error; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we might need return
after this too to avoid setting the readable stream to a failed response, just like above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that seems reasonable; fixed now.
…m.js` (issue 9791)
ac93db4
to
f78efd8
Compare
Nice work! |
While I'm not very familiar with Node.js, this patch should (hopefully) cover the multiple ways in which files can be loaded in Node.js environments; while also taking into account e.g. the differences between the
XMLHttpRequest
and the{http, https}.request
methods.Furthermore, the
creates pdf doc from non-existent URL
API unit-test now passes in Node.js/Travis.Fixes #9791.