JSON response conversion to page and page list
I have a rest connector which has a unique setup for the response. The response when successfully is sent back as a JSON object; however, the response when errored is a JSON array. Within the rest connector I can set the response 'Message Data' to JSON and provide a property, but this property can only be a Page List or Single Page. Is there a way to make this dynamic to accommodate the two different responses?
Successful response:
{"workItemID: string}
Errored response:
[{'message':'Wrong data in the body of the request. ','error':[{'code':'OBJECT_MISSING_REQUIRED_PROPERTY','params':['id'],'message':'Missing required property: id','path':'#/providers/0','description':'Provider data required for creation'}]}]
I have also attempted to map to text property, but have not been successful in converting the string property holding JSON to a Page List either.