An error message tells you exactly what went wrong in your code so you can fix it. It gives you all the clues you need to change the code so it runs properly.
What an error message looks like:
How to trigger an error message:
The tests for each lab on Learn will be found inside the
spec directory of that lab. Tests are programs, written to make sure your program is running properly. Generally, tests will call on the methods you define in your programs and check to see if they are working the way they are expected to.
The code in the
spec directory is there to test the code in your program. When you run the
learn command in your terminal (in the directory of the lab you are working on), that runs the code in your
spec file and tests your program.
The output that appears in your terminal is the result of running those tests. If you pass a test, the output will generally appear green, otherwise, it will appear red and be accompanied by error messages (as in the above screenshot).
How to copy an error message to send to a Technical Coach:
Scroll up to the command you ran that triggered the error message (usually
learn ). Highlight from the command to the bottom of the output (the entire error message). In Ask a Question type three backticks ``` to open a code snippet. Then paste the error message in and click submit.
Reading Error Messages video:
To learn more about how to read an error message, check out this video from Avi: