Interactive Testing: Handling Errors

Learn how to handle the errors faced in interactive testing.

Issues faced

We use httpie to treat the key-value pairs as form input by including the --form or -f option.

$ http --form POST 0.0.0.0:3000/my-api number=1105 description="First Carmichael number"

We get a return code of 500 and an internal server error. What happened? How do we prevent this? When it happens, we see the error message in the terminal where the server is running:

Get hands-on with 1200+ tech skills courses.