Coding Exercise error handling

Hello, I'm creating my first exercise in Javascript but looks like I'm doing something wrong because if the answer is wrong then the error will suggest the answer to the student. How can I hide this ?:

llermaly_0-1642988723389.png

Solution

```

function allQuery() {
return {"query": {"match_all": {}}}
}

```

Test

```

describe('allQuery()', function() {
it('should return match_all query', function() {
const solution = {"query": {"match_all": {}}}
expect(allQuery()).toEqual(jasmine.objectContaining(solution))
});
});

```

Thanks

Comments

  • Bella
    Bella Posts: 3,694 traveler rank

    Hey @llermaly, sorry for the trouble you had creating your first coding exercise. This article explains in detail how to create coding exercises in the platform and some troubleshooting steps. If you're still having issues, please contact our Instructor Support team they'll be happy to assist!

    Bella Almeida

    Udemy Community