Troubleshooting Writes
Overview
Merge’s API provides tools that allow you to easily troubleshoot any issues with POST requests to Merge.
This consists of:
- Unified error and warning messaging directly within API responses
- Optional debug mode that lists logs of requests made from Merge to the relevant third-party API associated with the POST request to Merge
View the full list of possible errors and warnings in Writes Errors and Warnings Reference.
Warnings and errors
The warnings field contains details on issues that don’t stop the request from being successful.
The errors field contains details on issues that cause the request to fail.
Warnings
Warnings in POST responses notify you about issues with the request that did not prevent the Common Model instance from being created.
For example, if the request contains an unrecognized field, we will ignore the field and notify you with a warning in the response.
Errors
Errors in POST responses notify you about issues with the request that prevented the Common Model instance from being created.
For example, if the request was missing a required field, then we will not create the Common Model instance and return an error response instead.
Properties
Debug Mode
Logs of requests made from Merge to third-party platforms are available for transparency.
Debug Mode makes it easy to retrieve the logs for requests made from Merge to a third-party’s API as a result of a POST request to Merge.
This is most useful for cases where detail beyond the standard errors and warnings from Merge is helpful to troubleshoot, for example:
- Troubleshooting errors stemming from the third-party API (see error type
PROVIDER_ERROR) - Troubleshooting generic errors from Merge (see error type
ERROR)
Usage
To use Debug Mode, include is_debug_mode=true as a query parameter in the POST request.
In Debug Mode, the response includes the logs field, which is an array of log objects containing detail on outbound requests made to the end user’s API provider during the request.
Each log in the response will contain the following properties:
log_summary properties
log_summary properties