Expose more verbose error from SDK.
Closed this issue · 1 comments
PatrykKaczmarek commented
Hello!
I spent a lot of time debugging errors from SDK. I would be really helpful to return something more than:
Expected 2xx response to subscription modification request; received 400
especially when response contains failure information in NSData
:
// lldb:
po [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
// output:
{"error":"Interest name invalid","desc":"An interest name can be at most 164 characters long and contain: ASCII upper/lower-case letters, numbers and one of _=@,.:"}
It applies to all possible cases.
hamchapman commented
7afa7d6 adds the response body to the logged output when a request doesn't come back with a 2XX status code.