I'm getting the following error when trying to get a response using RoboSpice with Jackson mapping do to an incorrect mapping for the error JSON returned
POST request for "https://****/api/register?email=jam@yum.com&first_name=Vege&last_name=Mite&password=qwerty12345&invite_token=oXlTvAvbVR5fiQP6DKCEVQ"
resulted in 422 (Unprocessable Entity); invoking error handler
E//RequestRunner.java:134īš 19:01:34.881 Thread-15097 An exception occurred during request network execution :422 Unprocessable Entity
using Curl I get the following correct response:
{"object":"Error","errors":{"email":["has already been taken"]}}
My Model Object for the repose that is failing is as follows, the issue is the "errors" item not mapping correctly but I am not sure what it should be since the variable name "email" can change (i.e. "agent", "vendor" , etc..)
@JsonIgnoreProperties(ignoreUnknown = true)
public class BaseModel {
private String id;
private String email;
private String first_name;
private String last_name;
private String street1;
private String street2;
private String city;
private String state;
private String zipcode;
private String country;
private String phone;
private String create_at;
private String object;
private Map<String, ArrayList<String>> errors;
//Getters and Setters Removed