+ Start a Discussion
Santosh K SamudralaSantosh K Samudrala 

Trailhead Challenge unable to verify


I had done the challenge at the below link , I was able to test and get the desired results , but the challange is failing.


Can you please check and let me know.User-added image
Amit Chaudhary 8Amit Chaudhary 8
Can you please share your code.

Please check below post for same issue
1) https://developer.salesforce.com/forums/?id=906F0000000MJXvIAO
2) https://developer.salesforce.com/forums/?id=906F0000000D6FgIAK

MAke sure your method should be like below
public class AnimalLocator{
    public static String getAnimalNameById(Integer x){
     ....your code here

Let us know if this will help you
Santosh K SamudralaSantosh K Samudrala
Hi Amit,

Thank you for your quick response !!

I was able to figure out the issue , in the Challenge question Endpoint was given as "https://th-apex-http-callout.herokuapp.com/animals/:id " , so i was passing : before the number , it returns a JSON with a null parameter against the name , i removed the : in the Endpoint and Challenge is verified. I can say that your Dev forums post referrals helped me in looking at this angle.

Thank you !!!

Santosh K SamudralaSantosh K Samudrala
This is resolved after tweaking the endpoint to be "https://th-apex-http-callout.herokuapp.com/animals/"+id(value passed to the method as parameter) instead of "https://th-apex-http-callout.herokuapp.com/animals/:id " as mentioned in the trailhead challenge question.