Skip to content
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

Handle nil and empty string content edge-cases #95

Merged
merged 1 commit into from
Dec 14, 2020

Conversation

abrom
Copy link
Contributor

@abrom abrom commented Dec 7, 2020

Resolves #94

Handle nil input case by treating it as an empty string (convert all input to a string with to_s)

Handle empty string case in the processor by passing a single space to Puppeteer instead. Likely cause is that Puppeteer is taking an empty string to mean "not provided" and thus ignoring the call to respond, instead choosing to wait for further input.. which never comes:

https://github.com/puppeteer/puppeteer/blob/v5.5.0/docs/api.md#httprequestrespondresponse

@abrom
Copy link
Contributor Author

abrom commented Dec 7, 2020

@alexwbuschle how does this look to you? It also means that Grover would "deal" with other input types too.. ie if someone passed in some other type than a String (or NilClass)

Copy link

@alexwbuschle alexwbuschle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👏

@abrom abrom merged commit f30a785 into main Dec 14, 2020
@abrom abrom deleted the handle-blank-input-edgecases branch December 14, 2020 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Call Grover.new('').to_pdf gets stuck forever
2 participants