Handles data (or error) response returned by handler. Provides unified shape of response for all **formula** services.
npm install @argodigital/formula-responseHandles data (or error) response returned by handler. Provides unified shape of response for all formula services.
By default response will return data with status code 200 or an error with status code matching code in statuses package (see errors package for error customization).
In addition, response can be customized through input of formula-sl-function and responseOptions object. In example:
``js``
postUser:
component: "@argodigital/formula-sl-function"
responseOptions:
statusCode: 201
attributes:
- name
- email
- dob
id: userId
More options are listed on jsonapi-serializer package page.