Fork me on GitHub
#hoplon
<
2016-03-01
>
numberq23:03:06

I've been trying to get a client talking to a server with castra for a little while now, and I haven't had any luck so far. The latest bit of advice I got was to check my server in a REPL to make sure that's working, and after finally managing to get a REPL setup for my server (I was missing the db-spec), nothing seems to be wrong with it. My RPC mkremote functions in the client continue to return server errors, though. I think I'm probably misunderstanding something fundamental about castra or RPC or something, and the documentation and examples I've found haven't been very helpful. Is there maybe some weird interaction it's having with Heroku, where I'm hosting my server?

alandipert23:03:27

@numberq: what kind of errors do you get?

alandipert23:03:06

@numberq: mkremote/castra plumbing don't do much more than a regular ajax call does, so you can look for things in the browser's "network console" if you're on chrome

alandipert23:03:14

that will show you exactly what the request/response/errors are

numberq23:03:01

@alandipert: The RPC requests are being responded to with status 200 OK, but the payload is just what I have set for the not found route. Interestingly (at least, to me), if I don't wrap my application in wrap-castra in the server call, it returns a 404 Not Found instead of 200 OK, but otherwise nothing changes.

numberq23:03:06

Also, I'm not very familiar with ajax, so I think I'll look into that at a later date and see if it helps elucidate things for me