singleton icon indicating copy to clipboard operation
singleton copied to clipboard

[BUG][Java Service][V1][S3]Return 200 when requesting non-existing version or component in multiple components APIs.

Open lyiyu66 opened this issue 2 years ago • 0 comments

Describe the bug commit: 93ffa26a7c0616ff7fee3eb25318342d1dc8975b [V1][S3]Return 200 when requesting non-existing version or component in multiple components APIs. Effected apis: GET[​/i18n​/api​/v1​/translation​/components] GET[​/i18n​/api​/v1​/translation​/product​/{productName}​/components​/{components}]

To Reproduce Steps to reproduce the behavior:

  1. Go to 'GET[​/i18n​/api​/v1​/translation​/components]' and input non-existing version or component as parameter: http://:8091/i18n/api/v1/translation/components?productName=VMwareVIP&version=1234&components=default&locales=zh-hans or http://:8091/i18n/api/v1/translation/components?productName=VMwareVIP&version=1.1.0&components=abd&locales=zh-hans
  2. See response:
{
  "response": {
    "code": 200,
    "message": "OK",
    "serverTime": ""
  },
  "signature": "",
  "data": {
    "productName": "VMwareVIP",
    "version": "1.1.0",
    "dataOrigin": "",
    "pseudo": false,
    "machineTranslation": false,
    "locales": [
      "zh-hans"
    ],
    "components": [
      "abd"
    ],
    "bundles": [],
    "url": "",
    "id": 0
  }
}

Expected behavior Should return 404 and no translation is found. {/response/code=404, /response/message=Faild to get translation from data for VMwareVIP/1.1.0}

lyiyu66 avatar Jul 29 '22 10:07 lyiyu66