Skip to content

Instantly share code, notes, and snippets.

@mackhowell
Last active September 11, 2018 18:33
Show Gist options
  • Save mackhowell/978e67a78925bbf28b8af337e314e208 to your computer and use it in GitHub Desktop.
Save mackhowell/978e67a78925bbf28b8af337e314e208 to your computer and use it in GitHub Desktop.
pubnub status "Bad Request"
func updateSongInformationForListener(currentTrack: Track, channelID: String) {
let song = currentTrack.dictionaryValue()
client.publish(song, toChannel: channelID, compressed: true) { (status) -> Void in
if status.error {
print("*** pubnub publish error: \(status.category), \(status.error.description)")
print(status.debugDescription)
// Request can be resent using: status.retry()
}
}
}
/*
print(status.debugDescription) ==
{
Category = "Bad Request";
Error = YES;
Operation = Publish;
Request = {
Authorization = "not set";
Method = GET;
Origin = "pubsub.pubnub.com";
"POST Body size" = 0;
Secure = YES;
URL = null;
UUID = "Dave Qadude";
};
Response = {
"Processed data" = "no data";
"Status code" = 400;
};
}
*/
@erolando
Copy link

me too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment