vmware / singleton

A service that provides support for Software Internationalization and Localization
Other
68 stars 64 forks source link

[BUG][Go Service]Return 404 when there is no component in requesting product/version on localelist/componentlist/supportedlanguagelist APIs. #1982

Open lyiyu66 opened 1 year ago

lyiyu66 commented 1 year ago

Describe the bug commit: a3840c9ffc8abf789b0306105e95ce760115c1c6 Return 404 when there is no component in requesting product/version on localelist/componentlist/supportedlanguagelist API. Effected APIs: getting localelist/componentlist/supportedlanguagelist APIs

To Reproduce Steps to reproduce the behavior: Takes component list as example:

  1. Go to component list api: GET [/translation/products/{productName}/versions/{version}/componentlist]
  2. Request a product&version: no data under product/version folder.
  3. Check the response:
    {
    "response": {
    "code": 404,
    "message": "SingleVersionNoData/2.0.0 doesn't exist"
    },
    "data": {
    "components": null,
    "productName": "SingleVersionNoData",
    "version": "2.0.0"
    }
    }

Expected behavior Return to 200 with [] empty list for components item.

Xiaochao8 commented 1 year ago

This is an abnormal case and dosn't occure in normal situation, so mark it as low priority.