singleton icon indicating copy to clipboard operation
singleton copied to clipboard

[BUG] [Java Service]Return 200 with empty data when there is no component in requesting product/version on localelist API.

Open lyiyu66 opened this issue 3 years ago • 0 comments

Describe the bug commit: c6dac6545fa76d51cd1e5d53342855140647d551 Return 200 with empty data when there is no component in requesting product/version on localelist API.

To Reproduce Steps to reproduce the behavior:

  1. Go to 'GET [​/i18n​/api​/v2​/translation​/products​/{productName}​/versions​/{version}​/localelist]'
  2. Request a product&version: no data under product/version folder.
  3. Check the response:
{
  "response": {
    "code": 200,
    "message": "OK",
    "serverTime": ""
  },
  "signature": "",
  "data": {
    "locales": [],
    "version": "2.0.0",
    "productName": "SingleVersionNoData"
  }
}

Expected behavior Should return 404 and null data.

{
  "response": {
    "code": 404,
    "message": "Failed to get locale list for SingleVersionNoData/2.0.0",
    "serverTime": ""
  },
  "signature": "",
  "data": null
}

lyiyu66 avatar Oct 24 '22 08:10 lyiyu66