Integrate without mixing responsibilities
Build a request and handle errors while keeping credentials on the server.
Explore the lessons
- Prepare the state
What it is: The state sent to the model should contain the information necessary for the question. More content does not automatically mean more quality. Irrelevant documents can make the decision harder and increase cost. Start by identifying which fields support the judgment.
Why learn: Build a request and handle errors while keeping credentials on the server.
Key concepts: context, criteria, and evidence applied to lesson 9.1.
- Understand a request
What it is: The API receives model, state, and questions. Each question has an application-chosen key, a type, and instructions. Choice adds a map of alternatives; Score provides a list of ordered levels; Noul may include criteria for true and false. The lab exports an example JSON without credentials.
Why learn: Build a request and handle errors while keeping credentials on the server.
Key concepts: context, criteria, and evidence applied to lesson 9.2.
- Handle operational failures
What it is: An integration must anticipate failure before receiving the first response. Invalid credential, rejected contract, request limits, and unavailability are not the same situation. Repeating an authentication error several times normally only wastes time; temporary overload may allow a controlled retry.
Why learn: Build a request and handle errors while keeping credentials on the server.
Key concepts: context, criteria, and evidence applied to lesson 9.3.