Skip to main content

I have completed below challenge(Apex Web Services) and it executed perfectly with 100% code coverage but still getting the error that

 

"Challenge not yet complete in Trailhead Challenge

Executing the 'AccountManager' method failed. Either the service isn't configured with the correct urlMapping, is not global, does not have the proper method name or does not return the requested account and all of its contacts."

 

Create an Apex REST service that returns an account and its contacts.

Create an Apex REST class that is accessible at /Accounts/<Account_ID>/contacts. The service will return the account's ID and Name plus the ID and Name of all contacts associated with the account. Write unit tests that achieve 100% code coverage for the class and run your Apex tests.

  • Create an Apex class
    • Name: AccountManager
    • Class must have a method called getAccount
    • Method must be annotated with @HttpGet and return an Account object
    • Method must return the ID and Name for the requested record and all associated contacts with their ID and Name
  • Create unit tests
    • Unit tests must be in a separate Apex class called AccountManagerTest
    • Unit tests must cover all lines of code included in the AccountManager class, resulting in 100% code coverage
  • Run your test class at least once (via Run All tests the Developer Console) before attempting to verify this challenge.

 

PLEASE HELP ME WITH THIS

0/9000