2

I am a super noobie to Retrofit and changed existing code of a class to send a list of strings instead of a single string. However with the change I get the above error. The class is defined as :

class MyEvent {
    public List<String> orderIds;

    public MyEvent(List<String> orderIds) {
        this.orderIds = orderIds;
    }
 }

and then at the calling code for this I have :

new MyEvent(orderIds))

where orderIds is List

However the moment I use this in my request it fails back and goes into :

        public void failure(RetrofitError error) {

How do i figure out what i am doing wrong? Any pointers gladly appreciated.

user3570727
  • 10,163
  • 5
  • 18
  • 24
  • Possible duplicate of [The Best Way to Debug Retrofit Error Messages](http://stackoverflow.com/questions/21071952/the-best-way-to-debug-retrofit-error-messages) – njzk2 Oct 20 '15 at 19:00
  • Can you show us how you make the request? And also, does your server support multiple values for the same parameter? – rciovati Oct 20 '15 at 19:01

1 Answers1

0

It's best to enable logging for retrofit, it's easy to do with a library.

Most likely you have a validation response that is being thrown out.

I use 'com.squareup.okhttp3:logging-interceptor:3.2.0' Here's a helpful post about how to enable it: Logging with Retrofit 2

Community
  • 1
  • 1
David Aleksanyan
  • 2,953
  • 4
  • 29
  • 39