Your climbing log is hardened. The three exercises checked it from the outside, one request at a time, and Ines’s nonsense now bounces off with the right status and code. Passing tests show that the log gives the right answers. They can’t show whether you know why your code gives them or whether you could add a rule safely when Ines asks for one.
In this review, you’ll talk a mentor through your own API. You’ll follow one bad climb through your middleware, your schema, and your error handler. Then you’ll get a new rule from Ines that you haven’t seen yet, and you’ll add it. If you have time left, you can go further: explain why some refusals come from the store instead of the schema, and say what a crash tells the client and what it tells you.
Get Your Log Ready
The mentor works from the code you wrote, so open your Crux Corner project: app.ts, middleware.ts with validate(), responses.ts with HttpError and toErrorResponse(), errors.ts, the file with your climb schemas, the log’s store, and routes/log.ts. You’ll paste them into the conversation when the mentor asks for them.
You’ll also need two terminals in the project folder because you’ll make the final change and test it with curl -i, as you did all through the course. The mentor’s requests assume the log holds its three starting climbs: Mei’s, Tunde’s, and Sofia’s.