Creating interceptors
The helping-hands.consumer.core namespace defines all the interceptors that are used for the routes of the Consumer microservice. Validation interceptors validate the input parameters and make sure that all the required fields are present in the request. They also prepare the input parameters for the business logic interceptors by creating a :tx-data key with all the required parameters.
Validation interceptors may also perform transformations, such as changing the CSV of the flds parameter to a vector of field names that is required as an input for the entity function defined by ConsumerDB protocol. They terminate the request with a HTTP 400 Bad Request status if the required parameters are not present. They also define ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access