"422 Unprocessable Entity" with no other information

1,942 views
Skip to first unread message

John Joseph Bachir

unread,
Aug 22, 2011, 11:11:32 AM8/22/11
to soundc...@googlegroups.com
My app updates users purchase_url for their sets. For one particular user, when I try to do this, I get "422 Unprocessable Entity", with no further information. I did a get on that same set to make sure that it does exist. It's not an issue of a set with an existing value, because I have tried overwriting this value in other instances, and it works.

What could be causing this? Is there a way for me to see a more detailed error message? 422 isn't covered in the docs: http://developers.soundcloud.com/docs#errors and the ruby library doesn't return anything for a failed put, so it's not easy for me to examine the body, if there is anything there (I'm going to explore that more now).

Thanks!

John


SoundCloud API Support

unread,
Aug 22, 2011, 12:16:02 PM8/22/11
to soundc...@googlegroups.com
Hi John,

422 means, that your request is syntaxtically correct, but of an
incorrect structure for this resource. Typically you are missing
required properties or use incorrect data structures (e.g. strings
instead of arrays).

Sorry that this explenation wasn't in the docs, I've added it to the
errors page.

What is the body you are sending?

Best,
Johan // SoundCloud API Developer

> --
> You received this message because you are subscribed to the Google Groups
> "SoundCloudAPI" group.
> To post to this group, send email to soundc...@googlegroups.com.
> To unsubscribe from this group, send email to
> soundcloudap...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/soundcloudapi?hl=en.
>

John Joseph Bachir

unread,
Aug 22, 2011, 12:40:06 PM8/22/11
to soundc...@googlegroups.com
Thanks for the fast response!

On Mon, Aug 22, 2011 at 11:16 AM, SoundCloud API Support <api-s...@soundcloud.com> wrote:
What is the body you are sending?

Here's my ruby api invocation:

put('/me/playlists/12345', :playlist => {:purchase_url => 'http://example.com/foo/123'})

Same thing I'm using in a lot of other cases, where it does work.

Let me know if you want to know the real data I am sending and I'll send it off-list.

John


John Joseph Bachir

unread,
Aug 23, 2011, 11:31:15 AM8/23/11
to soundc...@googlegroups.com
Hi Johan-- Any ideas on what the problem is?


SoundCloud API Support

unread,
Aug 24, 2011, 6:37:03 AM8/24/11
to soundc...@googlegroups.com
You have to do the request against /playlists/12345 and not /me/playlists/12345

put('/playlists/12345', :playlist => {:purchase_url =>
'http://example.com/foo/123'})

Best,


Johan // SoundCloud API Developer

On Tue, Aug 23, 2011 at 5:31 PM, John Joseph Bachir

John Joseph Bachir

unread,
Aug 26, 2011, 4:18:12 PM8/26/11
to soundc...@googlegroups.com
On Wed, Aug 24, 2011 at 5:37 AM, SoundCloud API Support <api-s...@soundcloud.com> wrote:
You have to do the request against /playlists/12345 and not /me/playlists/12345

put('/playlists/12345', :playlist => {:purchase_url =>
Best,
Johan // SoundCloud API Developer

Tried this, I got the same 422 error message back.

My code is working properly for hundreds of other sets and tracks -- is there some circumstance where the purchase_url can't be changed? Some public/private embeddable/nonembeddable app/noapp setting?

SoundCloud API Support

unread,
Aug 28, 2011, 6:55:52 AM8/28/11
to soundc...@googlegroups.com
Can you post the ID of the playlist (public or private doesn't matter)
and the user you are authenticated as when doing the request?

Best,
Johan // SoundCloud API Developer

Reply all
Reply to author
Forward
0 new messages