Create a space using Ruby client library
AnsweredI can successfully create a space using the Ruby Client library with a web app hosted on heroku using Sinatra, but upon making the call I get an HTTP 500 Internal Server error.
I can successfully authenticate, write statues to existing workspaces, but when the space.create function is called I receiver 500 error.
Internal Server Error
can't convert Array into String
Podio::Status.create(1466868, {:value => 'Status Test'}) <- this functions
Podio::Space.create({:name => "TestWorkspace3", :org_id => 203866}) <- after executing the above error pops up.
I was passing parameters into this function from a form, so i thought maybe I was passing an incorrect value, so i've tried just passing in raw values, but still receive the error. I took a look at the examples and formatting and structure of the call looks correct. Any ideas why this specific function would cause HTTP 500 versus the status create?
I put in the rescue commands in the examples, but those don't appear to be executed and nothing shows up in my heroku logs for the "puts" commands.
-
Hi Chris
I have looked in the logs and I can't see that we throw any HTTP 500. I suspect the 500 is coming from your own app and not Podio, which could also explain why you are not able to catch the exception. I can also see there are around 54 workspaces in your org named something like "Test workspace", so I am pretty sure the API part works.
Christian
-
Figured as much, but thought I'd ask. You don't see anything wrong with the statements I've posted? I guess if the space is creating then the API is working and that takes the API out of the picture. Though I can't figure out why status.create doesn't throw an error, but space.create in the same code block does throw an error, so that is why I came here first.
Thanks for taking a look.
Please sign in to leave a comment.
Comments
3 comments