OAS validation failure due to Request Accept header '*; q=.2' is not a valid media type: []

In the Apigee prosy, we are doing OAS validations as per yaml file. While testing it is failing whenever client is passing Accept header value as "text/html,image/gif,image/jpeg,*; q=.2,*/*; q=.2"

Error message: {"fault":{"faultstring":"OASValidation OAS-xxxx with resource \"oas:\/\/OAS-xxxx-api.yaml\": failed with reason: \"[ERROR - Request Accept header '*; q=.2' is not a valid media type: []]\"","detail":{"errorcode":"steps.oasvalidation.Failed"}}}

We have tried setting these values as per one of the post shared in this group.

<OASValidation continueOnError="true" enabled="true" name="OAS-xxx">

In Raise fault, we have added this condition:

Not(OASValidation.OAS-Nicepay.fault.cause JavaRegex ".*Request Accept header '\*; q=\.2' is not a valid media type.*")

However, due to this condition check, we are not able get the error content in the  java script which is the next step in the flow. Requirement is to parse the error message to know which mandatory header parameters are missing in the request.

2 0 44
0 REPLIES 0