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

Returns 201 even if nothing created #12

Open
mattcodez opened this issue Sep 27, 2017 · 1 comment
Open

Returns 201 even if nothing created #12

mattcodez opened this issue Sep 27, 2017 · 1 comment

Comments

@mattcodez
Copy link

This is really an issue with me getting pdf-bot to work at all. Right now I can send POSTs and they get added to the job queue as completed, but no PDF is generated. The response JSON seems to confirm that nothing is being done:

{
    "meta": {
        "type": "invoice",
        "id": 1
    },
    "url": "https://localhost:3001/test",
    "id": "ae6f6151-cb6a-4d21-914b-a10a8154ff94",
    "created_at": "Wed, 27 Sep 2017 16:55:30 GMT",
    "completed_at": null,
    "generations": [],
    "pings": [],
    "storage": {}
}

My /test endpoint is never touched as well as the /hook. I have google-chrome running via pm2 and am running pdf-bot with a basic local storage config file. I can't get any errors to display anywhere.

  1. At the very least, I think that 201 Created should not be the response if nothing is actually created.
  2. Is there anything obvious I'm missing in getting pdf-bot working? Thanks.

Config if it helps:

var htmlPdf = require('html-pdf-chrome');
module.exports = {
  api: {
    port: 3000,
    token: 'api-token'
  },
  generator: {
    completionTrigger: new htmlPdf.CompletionTrigger.Timer(1000) // 1 sec timeout
  },
  storagePath: "/Users/matthewmolnar/junk/pdf-storage",
  webhook: {
    secret: '12345',
    url: 'http://localhost:3001/hook'
  }
}
@jeremyhaile
Copy link

I am also having trouble. Nothing is being inserted into db.json. No PDFs are generated.

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

No branches or pull requests

2 participants