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

[management] Invalid Path mappings cause management API returns 500 #2424

Closed
rtau-t24 opened this issue Jul 3, 2019 · 0 comments

Comments

@rtau-t24
Copy link

commented Jul 3, 2019

When an invalid path mapping is entered, such as /a/{asfa}, HTTP 500 will be returned. Even worse, all management API call now returns 500 for the error.

Expected Behavior

The invalid path mapping should not be written to the database, nor causing any other API to fail.

Current Behavior

Every management API calls after that path mapping entered returns HTTP 500, which disallow users to revert the error.

Possible Solution

Validate the path mapping before write to DB.

Steps to Reproduce (for bugs)

  1. On an API, go to "Analytics"->"Path mappings"
  2. Create a path mapping from scratch, enter an invalid path, such as /invalid/{dos}
  3. Save the path mapping

Context

This issue just kill the management API with no return. Direct mongoDB is required to recover from the error.

Your Environment

  • Version used: 1.27.0
  • Browser Name and version: Chrome 75
  • Operating System and version: OSX 10.14.5
@NicolasGeraud NicolasGeraud self-assigned this Sep 20, 2019
@NicolasGeraud NicolasGeraud added this to the APIM - 1.25.12 milestone Sep 20, 2019
NicolasGeraud added a commit to gravitee-io/gravitee-management-rest-api that referenced this issue Sep 20, 2019
NicolasGeraud added a commit to gravitee-io/gravitee-management-rest-api that referenced this issue Sep 20, 2019
NicolasGeraud added a commit to gravitee-io/gravitee-definition that referenced this issue Sep 20, 2019
aelamrani added a commit to gravitee-io/gravitee-management-webui that referenced this issue Sep 20, 2019
@NicolasGeraud NicolasGeraud changed the title Invalid Path mappings cause management API returns 500 [management] Invalid Path mappings cause management API returns 500 Sep 21, 2019
brasseld added a commit to gravitee-io/gravitee-management-rest-api that referenced this issue Sep 23, 2019
@brasseld brasseld closed this Sep 23, 2019
brasseld added a commit to gravitee-io/gravitee-management-webui that referenced this issue Sep 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
API Management
Awaiting triage
3 participants
You can’t perform that action at this time.