When you are sending data to the Folio API during testing you can add the following to your queries that will have Folio return the error messages to you if anything goes wrong. These are not necessary for your live integration but can be helpful while you are testing the API.
errors {
message
extensions {
fieldName
subFieldName
rowIndex
}
}
The options for this are as follows:
- Message will give you the error message
- Field Name will give you the field name for the field if it is a field that is causing the error
- subFieldName will give you the name of the sub field if the error is in a sub field
- RowIndex is only for if the error is on a table, this will tell you which row is causing the error
For example in the query below I have left out the submitters email so the error message tells me that.
|
Request |
Response |
mutation {
|
{
|
Another example is in the query below where i did not have the end quotation mark on the fieldId
|
Request |
Response |
mutation {
|
{
|