urbanairship / ruby-library

A Ruby wrapper for the Urban Airship API.
Other
200 stars 117 forks source link

Updates alias to coerce to string #82

Closed bswinnerton closed 8 years ago

bswinnerton commented 9 years ago

The API appears to require that the "alias" value in the payload be a string. Unfortunately if a string is passed, you will receive an error similar to the following:

{
  "ok" => false,
  "error" => "Could not parse request body.",
  "error_code" => 40214,
  "details" => {
    "error"=>"Empty selector."
  },
  ...
}

This commit resolves that issue by coercing the parameter passed to the alias method into a string before including it into the payload.

jkvoorhis commented 9 years ago

Hey @bswinnerton, thank you for the PR. Would it be possible for you to share the request you were attempting to make? Along with the version of Ruby you are using? In our testing we did not observe this behavior and would like to poke at it a bit more before taking action with this PR in case the issue affects other methods.

jkvoorhis commented 9 years ago

@bswinnerton, wanted to follow up with you on this issue and see if you would be able to provide more information for us.

bswinnerton commented 9 years ago

Hi @jkvoorhis, I've been trying to get the latest ruby version in time for the Friday deadline when the V1 API is deprecated - haven't had a time to look further into this : ). I'll report back soon with more in depth findings.

jkvoorhis commented 8 years ago

Hey @bswinnerton, wanted to check in again if this is still an issue?

pdxmele commented 8 years ago

Closing due to lack of activity. Please feel free to reopen if this is still a problem.