Response from API gateway breaks Javelin Flow

book

Article ID: 196932

calendar_today

Updated On:

Products

CA Test Data Manager (Data Finder / Grid Tools)

Issue/Introduction

We are using Javelin Rest calls to interact with an API Gateway.
Some times we get an error back such as:

Error reading JObject from JsonReader. Current JsonReader item is not String....

Cause

The API was returning an HTTP 200 but returning an string such as:

"The sim is already in status AA in XXXX. Please try reserving other sim"

Rather than a proper JSON format

Environment

Release: 4.9
Javelin 4.8

 

Resolution

Have the API Gateway developer always return proper Json or proper XML depending on the encoding.

 

Attachments