08 Apr 2014, 15:23
Generic-user-small

Anthony Cervo (5 posts)

In chapter 6, I’ve successfully created a bundle using POST:

$ curl -X POST http://localhost:3000/api/bundle?name=War%20Books

I verified that it was created. In the next section, though, where we attempt to PUT a book with ID 132 (The Art of War), I get an error:

curl -X PUT http://localhost:3000/api/bundle/fcbc3c3d211bcd6d5415c490a1000a9a/book/132
{
  "error": "bad_gateway"
}

Any ideas?

10 Apr 2014, 14:59
Generic-user-small

Anthony Cervo (5 posts)

Anybody?

15 Apr 2014, 14:25
Generic-user-small

Ellie @ Support (16 posts)

I will ping the author for you to take a look at the forums…

15 Apr 2014, 15:56
Generic-user-small

Anthony Cervo (5 posts)

Thanks…

17 Apr 2014, 21:40
Avatar_pragsmall

Jim R. Wilson (59 posts)

Hi Anthony,

Sorry for the delay, been dealing with some family medical issues.

Does a regular GET request pull back the bundle that you created?

$ curl http://localhost:3000/api/bundle/fcbc3c3d211bcd6d5415c490a1000a9a

My guess is that the program is choking trying to look up the book with ID 132. That is, line 17 of bundle.js

What is your config.b4db set to? Make sure you can use curl to GET that book.

21 Apr 2014, 16:38
Generic-user-small

Anthony Cervo (5 posts)

Yes, I can get the bundle:

{
  "_id": "fcbc3c3d211bcd6d5415c490a1000a9a",
  "_rev": "1-d90a9d2a08880d9f29e6fa4515702d50",
  "type": "bundle",
  "name": "War Books",
  "books": {}
}

26 May 2014, 11:16
Avatar_pragsmall

Jim R. Wilson (59 posts)

My guess is the bad_gateway refers to reading book/132 from the books database. What is your config.b4db set to?

  You must be logged in to comment