function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Balaji Chowdary GarapatiBalaji Chowdary Garapati 

Apex Rest Callout - Unable to Complete the challenge

Hi,

Im trying to complete the Rest Callout Challenge, for which i created a class called AnimalLocator which has exactly the method requested for "getAnimalNameById" as if in the below screen shot

Screen Shot of summary of class


But still I receive below error
Challenge Not yet complete... here's what's wrong: 
Executing the 'getAnimalNameById' method on 'AnimalLocator' failed. Make sure the method exists with the name 'getAnimalNameById', is public and static, accepts an Integer and returns a String.


 
Best Answer chosen by Balaji Chowdary Garapati
@Karanraj@Karanraj
If your code not returning the expected output also you will get an same error message. Check whether you have all the logics written propely in the code

All Answers

@Karanraj@Karanraj
If your code not returning the expected output also you will get an same error message. Check whether you have all the logics written propely in the code
This was selected as the best answer
shahnarendra4ushahnarendra4u
Hi Balaji, 

In developer console, select run all and see if AnimalLocator class get 100% coverage and then after check challenge button again, it should work. 

Thanks
Balaji Chowdary GarapatiBalaji Chowdary Garapati
@S.karanraj,


Thank you for your reply, Im not returning the right property, once I fixed it it worked. I would have relaized it, if the error message is appropriate.


Thank you,
Balaji
saran kumar 9saran kumar 9
please post all the code for the problem solution .