PerBonomi
10 years agoBoss
api call should fail, but gives success
Hi there, I'm trying to catch an error, but instead I get success; help?
Using this url, I get the appropriate response, error 100 "Please enter a subject":
https://community.spotify.com/restapi/vc/boards/id/spotifywelcome/messages/post?message.subject=
But doing the same with ajax I get a 200 OK response and console logs "success." Clearly I must be doing something wrong, but what? :)
Ajax:
$.ajax({ type: "POST", url: "/restapi/vc/boards/id/spotifywelcome/messages/post?message.subject=" }) .success(function() { console.log("success"); }) .fail(function() { console.log("fail"); });