Skip to content

Returns 201 even if nothing created #12

@mattcodez

Description

@mattcodez

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'
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions