Skip to content

[BUG] [GO service]Inconsistent behavior when inputting invalid locale on GET /formatting/number/localizedNumber API between GO and JAVA services. #2959

@lyiyu66

Description

@lyiyu66

Describe the bug
commit: 3c64756
Inconsistent behavior when inputting invalid locale on GET /formatting/number/localizedNumber API between GO and JAVA services.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'GET /formatting/number/localizedNumber' API.
  2. Input "abc" as locale parameter's value.
  3. See the responses:
    GO service: verify the locale validity
{
  "response": {
    "code": 400,
    "message": "invalid Locale 'abc'"
  }
}

JAVA service: return the en format

{
  "response": {
    "code": 200,
    "message": "OK",
    "serverTime": ""
  },
  "signature": "",
  "data": {
    "number": "567",
    "formattedNumber": "567",
    "scale": "0",
    "locale": "abc"
  }
}

Expected behavior
Should have consistent behavior.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions