Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non-existing custom mediation is reflecting in API while updated using RESTful API. #3574

Open
Nishan-SE opened this issue Feb 6, 2025 · 0 comments

Comments

@Nishan-SE
Copy link

Description

While updating the custom mediation using the publisher update RESTful API the user receives 500 error response but the API still get updated with the custom mediation used in the payload of API even if the particular custom mediation does not exist in the registry.

Steps to Reproduce

  • Start the API manager and go to the publisher portal.

  • Create and publish an API.

  • Update the API using the below command.

curl --location --request PUT 'https://:/api/am/publisher/v1/apis/{apiId}'
--header 'Content-Type: application/json'
--header 'Authorization: ••••••'
--data '{payload}'

  • Add the custom mediation in the payload as below:

"mediationPolicies": [{
"name": "sample_sequence",
"type": "IN"}],

  • Invoke the API.

Error response -

{
"code": 500,
"message": "Internal server error",
"description": "Error while updating API : xxxxxxxxxxx",
"moreInfo": "",
"error": []
}

We can observe even if the mediation policy does not exists in the Custom Policies of the Message Mediation form the publisher portal and if used in the payload of the update API still the API is getting updated with the non-existing mediation policy.

  • Image

Version

3.2.0, 4.3.0

Environment Details (with versions)

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant