1
0
-1

Hi,

I am trying to use your json api to write functionality into my iOS app to list cats for adoption.  Sometimes when I run the same exact query I get an "Unexpected System Error" message.  This happens on my iPhone almost always the first time I submit a json api query.  I reload my table view on the iPhone and submit the exact same query again and the list of cats is loaded in the table view.  I seem to have more luck on the simulator but the same error occurs there as well sometimes just not as often.

Here is the json I submit minus my api key

{
"objectType" : "animals",
"apikey" : "******",
"objectAction" : "publicSearch",
"search" : {
"fields" : [
"animalID",
"animalOrgID",
"animalAltered",
"animalBreed",
"animalDeclawed",
"animalDescriptionPlain",
"animalGeneralAge",
"animalGeneralSizePotential",
"animalHousetrained",
"animalLocation",
"animalLocationCoordinates",
"animalLocationDistance",
"animalName",
"animalSpecialneeds",
"animalSpecialneedsDescription",
"animalOKWithAdults",
"animalOKWithCats",
"animalOKWithDogs",
"animalOKWithKids",
"animalPrimaryBreed",
"animalRescueID",
"animalSex",
"animalSizePotential",
"animalUpdatedDate",
"animalPictures",
"animalVideoUrls",
"animalUptodate",
"animalStatus",
"animalAdoptedDate",
"animalAvailableDate",
"animalAdoptionPending",
"animalBirthdate",
"animalBirthdateExact",
"animalApartment",
"animalYardRequired",
"animalIndoorOutdoor",
"animalNoCold",
"animalNoHeat",
"animalOKForSeniors",
"animalActivityLevel",
"animalEnergyLevel",
"animalExerciseNeeds",
"animalNewPeople",
"animalVocal",
"animalAffectionate",
"animalCratetrained",
"animalEagerToPlease",
"animalEscapes",
"animalEventempered",
"animalGoodInCar",
"animalHousetrained",
"animalIntelligent",
"animalLap",
"animalNeedsCompanionAnimal",
"animalPlayful",
"animalPlaysToys",
"animalPredatory",
"animalTimid",
"animalCoatLength",
"animalEyeColor",
"animalGroomingNeeds",
"animalShedding",
"animalTailType",
"animalColor",
"animalHearingImpaired",
"animalHypoallergenic",
"animalMicrochipped",
"animalOngoingMedical",
"animalSpecialDiet",
"animalSpecialneeds"
],
"resultLimit" : "25",
"resultStart" : "0",
"resultSort" : "animalLocationDistance",
"filters" : [
{
"fieldName" : "animalStatus",
"operation" : "notequals",
"criteria" : "Adopted"
},
{
"fieldName" : "animalSpecies",
"operation" : "equals",
"criteria" : "cat"
},
{
"fieldName" : "animalLocationDistance",
"operation" : "radius",
"criteria" : "3000"
},
{
"fieldName" : "animalLocation",
"operation" : "equals",
"criteria" : "19106"
}
],
"resultOrder" : "asc",
"calcFoundRows" : "Yes"
}
}

 

Here is the json I get back from your server

HTTP/1.1 200 OK
Date: Sun, 20 Nov 2016 00:55:44 GMT
Server: Apache/2.4.6 (CentOS)
Access-Control-Expose-Headers: Authorization
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: POST
Access-Control-Allow-Headers: origin, content-type, accept
Cache-Control: no-cache, must-revalidate
Expires: Mon, 26 Jul 1997 05:00:00 GMT
Content-Length: 54
Content-Type: application/json
Connection: Close

{"status":"error","message":"Unexpected system error"}

Can someone please look at this and tell me if there is a problem in the json I am sending or there is a problem with the rescue groups api.

Thanks,

Greg

    CommentAdd your comment...

    2 answers

    1.  
      1
      0
      -1

      Greg,

      We're looking into this issue, but in the meantime you may be able to avoid the issue by requesting fewer fields.  For example, the animalDescription and animal media fields take some effort to put together, and I believe that they are causing the issue.  We're looking into the problem.

      Richard

      1. Greg Williams

        Ok thanks for your quick reply.  I will try without the description and load the description only when the user views the detail of the cat.  However I have functionality which shows the you tube videos and on the list of cats I display a video icon which shows whether there is a video or not so I am not sure what to do about that.  It would be great if you could provide a boolean field which just says whether there is a you tube video or not and pictures or not.  That would be great.  I just have to say this service is great.  Thanks for your help.

      2. Richard Saffell [RG]

        Greg, could you tell us if you are continuing to have this problem.  I have not been able to reproduce the issue recently (using your original code) and I'm hoping that it's been resolved.

      CommentAdd your comment...
    2.  
      1
      0
      -1

      The problem is not occurring as much as it used to but it is occasionally happening. It used to occur the first time I viewed the list of cats but now it does not. Now it occurs every once in a while. Usually if I refresh the table view it retrieves the data.  Thanks for the help  

        CommentAdd your comment...