Work with the Adapter Utils library
The Adapter Utils library provides the runtime capabilities that most adapter logic depends on. By building on this shared foundation, all adapters that use it gain the same set of capabilities instantly, and improvements to the library become available to every adapter when they update their dependency.
Capabilities
Use adapter utils in adapter.js
The two primary calls into Adapter Utils are identifyRequest (to make a request to the external system) and formatErrorObject (to produce a consistently formatted error). A third call for returning adapter metrics is also available.
The example below shows a complete call to identifyRequest, including error handling:
For more detail on constructing the reqObj passed to identifyRequest, see Work with adapter.js.
Update the adapter utils dependency
If changes have been made to Adapter Utils — either by updating to a new release or by running the adapter migrator — update the dependency in your adapter by following these steps: